- Run the following find command, noting that both standard output and standard error are returned:
find /etc -name passwd
- Rerun the command, saving standard output to a file:
find /etc -name passwd > /tmp/find.out
- This time, save error message:
find /etc -name passwd 2> /tmp/find.err
- Now, save the ordinary output to one file and the error message to a different file:
find /etc -name passwd > /tmp/find.out 2> /tmp/find.err
Redirecting Standard Output and Standard Error
