[logrotate] why the stderr cannot be redirected to stdout?
my command is this:
Code:
logrotate -v -f /opt/backup/logrotate.conf -s /opt/backup/logrotate.log 2>&1 >> /tmp/run.log Code:
reading config file /opt/backup/logrotate.conf |
Try putting the 2>&1 *after* the >> /tmp/run.log
Idk why; let us know IF it works for you (it did for me) |
Great, that works, but, how, why?
Quote:
|
2>&1 directs stderr where stdin currently goes.
So you must first direct stdin to the file. |
well, still dont understand, but I'll do my work:)
I'll google it, but the problem has been resolved now. I am closing it.
Quote:
|
All times are GMT -5. The time now is 11:20 AM. |