[UFO Chicago] very newbie 'nix question

Nick Moffitt nick@zork.net
Sat, 26 Jan 2002 16:40:06 -0800

begin  Elliot Shank  quotation:
> But the point is that they're not treated the same.  One of the
> problems with the phrase "everything is a file" is it necessitates
> the distinguishing "regular" to be placed in front of the term
> "file" when one is trying to indicate what most people call a
> "file".

	Perhaps.  But the mv man page will say "files" to mean "files
and directories".  Yes, the partition barrier exists, but it exists
for all files, including directories.  GNU mv will account for this
and do The Right Thing.

> Analogously, despite the presence of filesystem entries called
> "/dev/sdd1" and "/dev/lp0", I would not call the things referred to
> by those entries as "files".

	Perhaps you're just not from a Unix background, then.

> Try explaining "everything is a file" to your grandmother.  

	Ah, the grandmother fallacy!  Good to see that one cropping up
in anti-Unix debate again!  Someone really ought to add that one to

> Yes, the API consistency is nice and one of the biggest advantages
> of *NIX, but neither a device, pipe, socket, nor a directory is a
> file.  The implementation of a directory may be via a convenient
> reuse of the "regular file" storage mechanism, but it is not a file
> as your average human being would term it.  

	Your average human being would think of a file as either a
tool for grinding or a collection of information about a particular
topic.  An average human being would think of a directory as a
collection of mappings from information to its actual location.  A
directory or index page often appears in real world file folders or

	The metaphors are incorrect to begin with, so the nits you're
picking right now are particularly small.

> Hell, it used to be that you could easily look at the storage for a
> directory (the file names and the binary representations of the
> inode numbers), but now when you try to "cat ." you get "cat: .: Is
> a directory".

	Yeah.  I almost miss that.

	01234567 <- The amazing* indent-o-meter! 
        ^	    (*: Indent-o-meter may not actually amaze.)