Null: Difference between revisions
From Hackepedia
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
The null device | The null device located in /dev/null discards any data written to it. It's a black hole that eats everything that is sent to it. Unwanted output in shells can be redirected to /dev/null. Here is an example crontab where /dev/null is used to prevent emails from being sent: | ||
*/5 * * * * /usr/local/bin/fetchmail > /dev/null 2>&1 | */5 * * * * /usr/local/bin/fetchmail > /dev/null 2>&1 |
Latest revision as of 08:02, 25 October 2005
The null device located in /dev/null discards any data written to it. It's a black hole that eats everything that is sent to it. Unwanted output in shells can be redirected to /dev/null. Here is an example crontab where /dev/null is used to prevent emails from being sent:
*/5 * * * * /usr/local/bin/fetchmail > /dev/null 2>&1