I followed this link to change log-rotate configuration for RHEL 6
After I made the change to config file, what should I do to let this take effect?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
crontab to work. It's scheduled work, not a daemon, so no need to reload its configuration.
logrotate, it will use your new config file automatically.
If you need to test your config you can also execute
logrotate on your own with the command:
Or as mentioned in comments, identify the refer to slm's answer to have a precise cron.daily explanation
logrotate line in the output of the command
crontab -l and execute the command line
Most of the
logrotate setups I've seen on various distros runs out of the
/etc/cron.daily. There's a shell script there aptly named
$ ls -l /etc/cron.daily/logrotate -rwxr-xr-x 1 root root 180 May 18 2011 /etc/cron.daily/logrotate
If you want to make it run manually simply run the script as root:
$ sudo /etc/cron.daily/logrotate
If you take a look at a script that's typically there, it shows you how you can also run
logrotate manually, by simply running
logrotate + the path to its configuration file.
#!/bin/sh /usr/sbin/logrotate /etc/logrotate.conf EXITVALUE=$? if [ $EXITVALUE != 0 ]; then /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]" fi exit 0