Rotate logs now
Force log rotation without waiting for the schedule.
logrotate -f /etc/logrotate.conf
- tool
- linux133 commands
More linux commands
-
for u in $(cut -f1 -d: /etc/passwd); do crontab -l -u $u 2>/dev/null | grep -v '^#' | sed "s|^|$u: |"; donePrint the active crontab lines of every user, skipping comments.
-
systemd-analyze calendar '*/5 * * * *'Parse a schedule and show when it runs next. Note: systemd has its own calendar format and does not understand cron syntax.
-
command > /tmp/out.log 2> /tmp/err.logWrite stdout and stderr to separate files.
-
command 2>&1 | tee /tmp/all.logSend stdout and stderr to a file and to the screen at the same time.
-
grep -rl 'old_string' /etc/ | xargs sed -i 's/old_string/new_string/g'Find files that contain the text and replace it directly in them.