[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: UNIX/Linux text files

On Wed, Apr 21, 2004 at 07:32:15PM -0400, David Clymer wrote:
> On Wed, 2004-04-21 at 08:45, John Hasler wrote:
> > Adam Funk quotes:
> > > Eric Raymond, "The Art of UNIX Programming", chapter "What UNIX Gets
> > > Wrong": "Unix files have no structure above byte level."
> > 
> > Eric is wrong.  This not a bug.  This is a major feature.
> For those of us who are not intimately familiar with both sides of the
> argument, could you either explain your statement or provide a link to
> some resource which does? You may be entirely correct, however
> unsubstantiated assertions are fairly ineffective as a means of
> refutation.
> -davidc

In the paper 'The UNIX Time-Sharing System' by Ritchie and Thompson in Bell
System Technical Journal Vol 57 #6 part2 p 1907ff, an ordinary disk file is 
described as a sequence of characters on disk, or of binary words, whose
structure is controlled by the program that writes it, not by the system.
This is treated by these authors as a distinctly positive feature. Others
may differ, but the positive view of this goes back to the origins of UNIX.

In this paper, it is clearly recognized that there must be internal structure
to some disk files, but it is clearly expected that this structure will not
be imposed by the OS, or monitored by the OS. (Except that directories are
ordinary files whose contents cannot be written by user programs.)

Some of Eric's word choises seem to imply that the unstructured file idea
is foolish, but it seems to me that Ritchie and Thompson are not fools, and
the record is clear that they thought about this before making the choise 
that they made. 

I think this is an example of the continual tug of war between
complexity and simplicity in the user interface to a complex
system. Ritchie and Thompson got it right. It is always possible to
add extra complexity to a simple, but adequate, system in special
cases, but it is never possible to add extra simplicity to a complex
system in special cases.

Just my $.02.

Paul E Condon           

Reply to: