About Me

My photo
Working as Technical Lead in CollabNET software private limited.

Tuesday 26 February, 2008

What for /dev/null?

Do you know why they redirect to /dev/null

/dev/null or the null device is a special file that discards all data written to it

The null device is typically used for disposing of unwanted output streams of a process. It's equivalent to "don't bother about the results ".

ex:

ls -l *.txt > name.txt 2>/dev/null

No comments: