2010年8月16日

stdout stderr

1 - denotes stdout ( standard output )
2 - denotes stderr ( standard error )
/dev/null . apparently is null , nothing , empty , zero etc , etc .

2>/dev/null - redirect stderr to nothing , it turns stderr off.

>/dev/null 2>&1 also can write as 1>/dev/null 2>&1 - stdout redirect to /dev/null (no stdout) ,and redirect stderr to stdout (stderr gone as well) . end up it turns both stderr and stdout off

a little practice may help to undstand above .
#ls /usr /nothing
#ls /usr /nothing 2>/dev/null
#ls /usr /nothing >/dev/null 2>&1