Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: cron weekly to clean up files

  1. #1
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    455

    Default cron weekly to clean up files

    In trying to clean up old images, I get this message:

    Code:
    linux-j16l:/home/davek # /etc/cron.weekly/btrfs-balance.sh
    bash: /etc/cron.weekly/btrfs-balance.sh: No such file or directory
    linux-j16l:/home/davek #
    Should I create a directory?

    I ran this first:
    Code:
    linux-j16l:/home/davek # /etc/cron.daily/suse.de-snapper
    How do I correct this?
    Thanks

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,732

    Default Re: cron weekly to clean up files

    1) A bit sideways, but why are you trying to run things as root (which is correct for this case) while your working directory is the home directory of some end-user? Always chance that you break something for that user or leave there rubbish.

    2) When the message says that the file you try to execute does not exist, it most probably means that that file does not exist. So the questions is did you make a typo, or did you read something that told you that that file should exist (which is apparently not true). or .........
    Henk van Velden

  3. #3
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    455

    Default Re: cron weekly to clean up files

    Quote Originally Posted by hcvv View Post
    1) A bit sideways, but why are you trying to run things as root (which is correct for this case) while your working directory is the home directory of some end-user? Always chance that you break something for that user or leave there rubbish.

    2) When the message says that the file you try to execute does not exist, it most probably means that that file does not exist. So the questions is did you make a typo, or did you read something that told you that that file should exist (which is apparently not true). or .........
    I am the end user. Don't know what you mean by that? I'm running comands that were given to me in the forum.
    https://forums.opensuse.org/showthre...-run-cron-jobs

  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,333
    Blog Entries
    15

    Default Re: cron weekly to clean up files

    On Thu 06 Apr 2017 11:26:01 AM CDT, vinoman2 wrote:

    hcvv;2818930 Wrote:
    > 1) A bit sideways, but why are you trying to run things as root (which
    > is correct for this case) while your working directory is the home
    > directory of some end-user? Always chance that you break something for
    > that user or leave there rubbish.
    >
    > 2) When the message says that the file you try to execute does not
    > exist, it most probably means that that file does not exist. So the
    > questions is did you make a typo, or did you read something that told
    > you that that file should exist (which is apparently not true). or
    > .........


    I am the end user. Don't know what you mean by that? I'm running comands
    that were given to me in the forum.
    http://tinyurl.com/mwdt6mj


    Hi
    You need to ensure the package called btrfsmaintenance is installed
    for the other cronjob.

    --
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    openSUSE Leap 42.1|GNOME 3.16.2|4.1.38-50-default
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!


  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,732

    Default Re: cron weekly to clean up files

    Quote Originally Posted by vinoman2 View Post
    I am the end user. Don't know what you mean by that? I'm running comands that were given to me in the forum.
    https://forums.opensuse.org/showthre...-run-cron-jobs
    When you are the end-user, you can not do what you want to do. You must be the superuser (root).

    But I assume that you are root (because the prompt ends in a #). Isn't that true?

    I started reading that other thread. But in post #2 there it says:

    In Tumbleweed it's just btrfs-balance.
    I have no idea why you added the .sh in your first post there. And I have of course also no idea why you did not see the correction offered to you in post #2 and above make the same typing error again.

    In any case, looking in /etc/cron.weekly/ would probably have shown you that while btrfs-balance.sh isn't there, btrfs-balance is. Thus giving you a valuable hint.
    Henk van Velden

  6. #6
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    455

    Default Re: cron weekly to clean up files

    Thank you. the .sh was a typo from the person who sent it. Now the command is running fine.

  7. #7
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,732

    Default Re: cron weekly to clean up files

    Quote Originally Posted by vinoman2 View Post
    Thank you. the .sh was a typo from the person who sent it. Now the command is running fine.
    Maybe other ones typo, but it was corrected in your other thread.

    And again, next time try to interprete the error message and check if what you try to start is there and see if maybe something else is there that could be a solution. In other words, try to learn from it.

    And, of course, nice it works now.
    Henk van Velden

  8. #8
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    455

    Default Re: cron weekly to clean up files

    OK, after updates I ran the two commands for cleaning up the files and this time the btrfs-balance file was gone, so it couldn't find file, I created a new brtfs-balance folder/directory and this time I get this:

    Code:
    linux-j16l:/home/davek # /etc/cron.weekly/btrfs-balance
    bash: /etc/cron.weekly/btrfs-balance: No such file or directory
    linux-j16l:/home/davek # /etc/cron.weekly/btrfs-balance
    bash: /etc/cron.weekly/btrfs-balance: Is a directory
    linux-j16l:/home/davek #
    It recognized the directory but it didn't run the cron.weekly. Why ?

  9. #9
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,732

    Default Re: cron weekly to clean up files

    Quote Originally Posted by vinoman2 View Post
    OK, after updates I ran the two commands for cleaning up the files and this time the btrfs-balance file was gone, so it couldn't find file, I created a new brtfs-balance folder/directory and this time I get this:

    Code:
    linux-j16l:/home/davek # /etc/cron.weekly/btrfs-balance
    bash: /etc/cron.weekly/btrfs-balance: No such file or directory
    linux-j16l:/home/davek # /etc/cron.weekly/btrfs-balance
    bash: /etc/cron.weekly/btrfs-balance: Is a directory
    linux-j16l:/home/davek #
    Isn't it about time to show us (and yourself) what is there (and thus what is not there)?

    And of coures, the first thing you should do when you get such an error message is checking for yourself if the computer is correct (well, it mostly is):
    Code:
    ls -l /etc/cron.weekly/btrfs-balance
    OOr check what is in the directory:
    Code:
    ls -l /etc/cron.weekly/
    And this advice is not very different from my last few lines in post # 5 above.
    Last edited by hcvv; 14-Apr-2017 at 06:39.
    Henk van Velden

  10. #10
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,732

    Default Re: cron weekly to clean up files

    Quote Originally Posted by vinoman2 View Post
    OK, after updates I ran the two commands for cleaning up the files and this time the btrfs-balance file was gone, so it couldn't find file, I created a new brtfs-balance folder/directory and this time I get this:

    Code:
    linux-j16l:/home/davek # /etc/cron.weekly/btrfs-balance
    bash: /etc/cron.weekly/btrfs-balance: No such file or directory
    linux-j16l:/home/davek # /etc/cron.weekly/btrfs-balance
    bash: /etc/cron.weekly/btrfs-balance: Is a directory
    linux-j16l:/home/davek #
    It recognized the directory but it didn't run the cron.weekly. Why ?
    In fact I do not understand at all what you are doing. You say you created a directory and then you make a command as if that directory was an executable file?
    You do that two times and you get a different error on those two.
    Can we really trust what you show us there?
    Henk van Velden

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •