Error results
How do you route error messages to a designated file and folder? Many thanks and if my question is vague its because I suck at linux but I'll try to rephrase if I can. ^^
|
You can re-direct error output by using its descriptor, which is '2'. For example, using the find command from the root directory as a user generates errors because users don't have permissions to see all of the directories on the file system. You can re-direct the error messages to /tmp/output.log with:
Code:
find / -name dummyfile 2>/tmp/output.log Code:
find / -name dummyfile 2>/dev/null |
Thank you very much for your help! :D
|
Some programs already have logs for this in /var/log
Otherwise, you can route the output to a file by using a single ">" and the filename or append to file with ">>". Example ls -l > list.txt http://www.linuxdevcenter.com/pub/a/...lpt/13_01.html |
All times are GMT -5. The time now is 01:48 AM. |