how to create error log for tarball
This is a pretty simple question...
I have a script that runs in cron which backs up a certain directory and saves it to a file. I'm wanting to also display any error messages while doing this backup in a separate file. What would the syntax be for this? This is what I have right now: tar -c /usr/local/backups/htdocs.bak > /usr/local/backups/htdocsbak.tar Thanks, Brad |
Something like
tar -c /usr/local/backups/htdocs.bak > /usr/local/backups/htdocsbak.tar 2>/use/local/backups/errors '2' is standard error output. 2>/somewhere command redirects standard erro output (whet means: error messages) to the file. |
All times are GMT -5. The time now is 05:48 AM. |