Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
in bash "something || other" means that if "something" is FALSE then do "other". In crontab "run-parts --report /etc/cron.daily" will only happen when
"test -x /usr/sbin/anacron" is false. /usr/sbin/anacron does exist.
Testing in the terminal
$ test -x /usr/sbin/anacron || echo "xxx"
gave no echo. changing || to && gave the echo.
Meaning that since /usr/sbin/anacron exists the cron.daily will never happen!
So deleted the "test -x /usr/sbin/anacron ||" part in crontab,like
....
55 1 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
to just
55 1 * * * root cd / && run-parts --report /etc/cron.daily
....
Plus the test for /usr/bin/anacron ensures that cron runs the daily, weekly and monthly script only if anacron is not installed. Take a look at the file /etc/anacrontab. It is also configured to run the daily, weekly, and monthly scripts.If your anacron works well, no need to do the above change. Also grep -i 'anacron' /var/log/syslog will show you some useful info.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.