redirecting standard error (stderr) and standard output (stdout) to a file

Capturing both errors and normal list output from ls, with “long” and recursive options set,  to a file called /tmp/allout :

ls -lR > /tmp/allout 2>&1

Tags: , ,

Leave a Reply

You must be logged in to post a comment.