Results 1 to 4 of 4
what is the use of /dev/null or /dev/zero file while creating a swapfile?...
- 09-14-2009 #1Just Joined!
- Join Date
- Sep 2009
- Posts
- 1
use of /dev/null file
what is the use of /dev/null or /dev/zero file while creating a swapfile?
- 09-14-2009 #2Just Joined!
- Join Date
- Aug 2009
- Posts
- 76
/dev/null outputs 'null' data so its good for creating empty swapfiles and clearing out partitions.
- 09-14-2009 #3
- 09-15-2009 #4Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,970
/dev/null is the bit-bucket. Anything output there is gone into the great garbage collector in the sky. /dev/zero is also a special device that is used mostly for zero-filling data files. It is sometimes used to write null (ascii 0) data to disc drives in order to "reformat" them. Most drive controllers these days will, while zeroing out the drive, remap bad sectors when you do this. In fact, that is the only way to do a low-level format any more.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote
