Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Question use of /dev/null file

    what is the use of /dev/null or /dev/zero file while creating a swapfile?

  2. #2
    /dev/null outputs 'null' data so its good for creating empty swapfiles and clearing out partitions.

  3. #3
    Linux Engineer RobinVossen's Avatar
    Join Date
    Aug 2007
    The Netherlands
    How do you use this and where do you see this?
    Those 2 Devices represent 0 and NULL hope that helps.
    New Users, please read this..
    Google first, then ask..

  4. $spacer_open
  5. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    /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!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts