Title: Error Redirection (2>)
Course: CIS 121: Linux/UNIX I: Fundamentals ~ For IGNITE Review > Section: Learning Modules

Redirecting stderr is done with '2>'. This can be very useful to prevent error messages from cluttering your screen. The example below shows redirection of stdout to a file, and stderr to an error file. Writing '1>' is the same as '>'.
[paul@RHELv4u3 ~]$ find / > allfiles.txt 2> errorLog.txt

This next example shows redirection of stderr to /dev/null (the 'bit bucket'). /dev/null can be thought of as a 'virtual' trashcan.
[paul@RHELv4u3 ~]$ find / > allfiles.txt 2> /dev/null

(Cobbaut, p. 117)