Find the answer to your Linux question:
Results 1 to 4 of 4
what is the use of /dev/null or /dev/zero file while creating a swapfile?...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2009
    Posts
    1

    Question use of /dev/null file


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

  2. #2
    Just Joined!
    Join Date
    Aug 2009
    Posts
    76
    /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
    Location
    The Netherlands
    Posts
    1,429
    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
    $spacer_close
  5. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,691
    /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
  •