Everything2
Near Matches
Ignore Exact
Full Text
Everything2

/dev/null

"/dev/null" is also a: user

created by jammer

(idea) by everyone (4.2 wk) (print)   ?   I like it! Tue Oct 31 2000 at 17:53:19

I find it odd that only one writeup shows an actual use for /dev/null.

Okay, so here's one. Let's say a configure script wants to probe for pthread support:

echo "#include <pthread.h>\n\nint main() { return pthread_create( NULL, NULL, NULL, NULL ); }\n" > test.c
cc test.c ${LIBS} -o test 2>/dev/null

The script makes a simple pthread program and compiles it, redirecting its error stream to /dev/null. That way the user does not see compile errors. The script then checks the return code of the C compiler. If it's zero, it compiled and there is pthread support. Otherwise, there was a compile error thus there is no support for POSIX threads, and the script can give a verbose error message.

Well, that's one usage for /dev/null.


(idea) by Jargon (1.6 y) (print)   ?   I like it! Thu Jul 19 2001 at 7:27:26

= 0 = -0-

/dev/null /dev-nuhl/ n.

[from the Unix null device, used as a data sink] A notional `black hole' in any information space being discussed, used, or referred to. A controversial posting, for example, might end "Kudos to rasputin@kremlin.org, flames to /dev/null". See bit bucket.

--The Jargon File version 4.3.1, ed. ESR, autonoded by rescdsk.


(idea) by Glowing Fish (5.1 hr) (print)   ?   I like it! Mon Oct 15 2001 at 8:12:55

A relativly low level, harmless troll I once tried is to ask various linux centered usenet groups about the null device, pretending as if I believed it was a real, physical device.

For example, I asked whether or not I could install Linux on my new computer, because I was using all my serial ports, and didn't know if I could find any USB drivers for a /dev/null

There could be quite a few variations on this theme, as in asking Linux newsgroups whether or not they have /dev/nulls for The Cube, or whether you can get one small enough to attach to your new, ultra small laptop. The possibilities are endless.

This could be a funny prank, if the pranker manages to keep it within acceptable levels of obnoxiousness.


(place) by ssd (5.5 mon) (print)   ?   I like it! Tue Oct 16 2001 at 15:49:43

In Unix, everything is a file, including physical and logical devices, like disk drives, terminals, printers, tape drives, and in a strange way, even memory.

/dev/null is a character device with no physical manifestation. It is humorously called the write only backup device by the bofh community. On the surface, this may seem useless -- why bother writing to a device when you can never read the data back? The reason for writing to it is exactly that -- you never want the data back.

The /dev/null pseudo device is used specifically to throw away data you don't want. It is used by either redirecting output to the device, or by mentioning the device where the application expects an output filename. Sometimes it is easier to just tell the app to write its log file to /dev/null than to provide an option in the app to turn logging off. /dev/null is the unix oubliette, the perfect place for garbage, flames, stupid comments from lusers, etc.

 

In Microsoft Windows/msdos, the equivalent of /dev/null is null: or nul


printable version
chaos

cp /dev/zero /dev/null Microsoft UNIX /dev/random Paycheck
bit bucket Kaput /dev/zero BOFH
truncate /dev/full nowhere Write only memory
girlfriend dickless workstation Soledad O'Brien Oubliette
Bubble Wrap -0- The Cube Microserfs
Sailor Moon Larry Wall /dev Hello Sailor!
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
After stirring Everything, these nodes rose to the top:
Gordon Cooper
Life of Pi
Using Unicode on E2
Failure of the Gallipoli Campaign
I'm going to be a Dad
Fuel rationing
event cone
An incredibly stupid reason why I got called into the school counselor's office
p-n junction
Friedrich Nietzsche
Good Friday Agreement
Sea Change
The Fire Sermon
New Writeups
jjen
Sorrier than I ever thought I would be(personal)
locke baron
Moskva class antisubmarine cruiser(thing)
Wuukiee
May 15, 2008(idea)
locke baron
Kuznetsov class aircraft carrier(thing)
_lesra
for abby(thing)
Adaptive Child
Annie's garden salsa(recipe)
Simulacron3
Zig-Zag(thing)
Ouzo
Special Grilled Cheese(fiction)
Noung
Tiananmen Square Massacre(idea)
aneurin
Lord St Clair(person)
artman2003
Assholes and Douchebags: A Comparison(person)
locke baron
Tyan Thunder K8WE(thing)
locke baron
Udaloy class destroyer(thing)
Scaevola
Same-sex marriage(idea)
SteveMurrayFromNZ
British Standard Handful(idea)
This affordable entertainment brought to you by The Everything Development Company