VMS vs. UNIX file system

Michael I. Bushnell mike at turing.unm.edu
Mon Sep 19 19:31:57 AEST 1988


In article <68855 at sun.uucp>, guy at gorodish (Guy Harris) writes:
>> I disagree.  I much prefer VMS's variable-length-record text file format
>> to Unix's byte-stream.  Why?  Because the Unix byte stream uses perfectly
>> legitimate data as a record separator.  To make matters worse, the standard
>> C method for dealing with strings uses a *different* character as a string
>> terminator!  Unix has a lot of GREAT ideas in it, but this isn't one of them.
>
>Umm, as others have already pointed out, UNIX doesn't use '\n' as a record
>separator; it uses it as a *line* separator.  UNIX - like VMS - ultimately (at
>the kernel level) implements files as a sequence of bytes (RMS sits on top of
>QIOs that read virtual blocks of the file, *n'est ce pas?*).
>
>One file format UNIX happens to implement atop this abstraction is the "text
>file"; "text files" consist of "lines", which are sequences of bytes (not
>containing '\0' - some applications can't handle them, since it's the C string
>terminator) ending with '\n'.
>
>Other file formats exist, such as executable images and archives, which are,
>respectively, the UNIX equivalents of images (and object files - object files
>and images use the same format) and library files.

But a very important thing to remember is this:  The designers of UNIX
didn't expect to see people edit binaries, but they stuck with the
byte-stream abstraction.  Programs that are willing to stick to it
(like GNU emacs, and unlink ed, ex, and vi) can benifit tremendously.
I can and do edit binaries using emacs.  It didn't take *any*
modification of the operating system to do this, and emacs didn't
require *any* special modifications to do so...all it needed was to
learn how *not* to use separators. 

The point is that while you might not see the value in it now, you
might later, when it is too late.  Try using your favorite VMS editor
to edit a binary and change a string constant!  Not too likely, I'm afraid.
-- 
-- 
                N u m q u a m   G l o r i a   D e o 

       \                Michael I. Bushnell
        \               HASA - "A" division
        /\              mike at turing.unm.edu
       /  \ {ucbvax,gatech}!unmvax!turing.unm.edu!mike



More information about the Comp.unix.wizards mailing list