/dev/zero
Gerard Snitselaar
snits at snitselaar.org
Sun Feb 19 16:44:52 MST 2006
One thing to remember is that /dev/zero spits out a 0, not the ascii
encoding of a 0. Also it is not a regular file, but a device that you
are interacting with so the output that shows up in your editor depends
on what the driver is doing. Someone mentioned trying /dev/random and
the same thing applies. You will most likely see something, but it will
be bytes that map to ascii values for something. The important thing to
remember is that a file residing on your drive, such as a text file or
this email, doesn't really look like this. It is up to the the utilities
to translate it into something meaningful. So, when you try to look at
/dev/zero in an editor and see nothing it is because 0 in ascii
translates to a null string.
On Sun, 2006-02-19 at 13:19 -0500, Mike wrote:
> That was fun! I read about a file today called /dev/zero that contains an
> endless stream of zeros. This piqued my interest: "What does this look
> like," I thought. So I typed 'jpico /dev/zero' and guess what happened!
> NOTHING.
>
> The enter went to the next line but nothing happened. No pretty colors and
> prompt.
>
> What use is this device?
>
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss at lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change you mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>
More information about the PLUG-discuss
mailing list