Thats nice , keep on sending daily tips
--- On Fri, 2/27/09, b.sadhiq <[email protected]> wrote:
From: b.sadhiq <[email protected]>
Subject: [Linux_Mantra] Daily Tips
To: [email protected]
Date: Friday, February 27, 2009, 10:29 PM
Discarding all output -- including stderr messages.
$ ls > /dev/null 2>&1
Or sending all output to a file
$ someprog > /tmp/file 2>&1
Sometimes, find displays a lot of errors when searching through
directories that the user doesn't have access to. To discard
error messages "stderr", which is normally file descripter "2"
work the following:
$ find / -iname 'stuff' 2>/dev/null
or to pipe results elsewhere
$ find / -iname 'stuff' > /tmp/results_ of_find 2>/dev/null
[Non-text portions of this message have been removed]