An inconvenient truth [OT Unix vs. Windows]

Bruce Adams tortoise_74 at yeah.who.co.uk
Wed Oct 15 20:01:37 PDT 2008


On Wed, 15 Oct 2008 11:40:51 +0100, Bruno Medeiros  
<brunodomedeiros+spam at com.gmail> wrote:

> No, I don't mean the capabilities of the file system itself (ie, NTFS vs  
> ext3), in fact, that stuff you mentioned (8.3 filenames or case  
> sensitivity are things I consider as disadvantages)
>
> I meant rather the way the Linux filesystem is organized (ie,  
> /usr,/dev,/etc, /mnt,/opt,/bin ... etc.) the way mounts have to be made,  
> etc.. Without going into detail, I don't like that the OS is spread  
> across several directories. I would rather all the OS data were under  
> one directory only. So the default directories after installation would  
> only be 3: one for the OS, one for user data, one for programs. The same  
> thing can be said of programs, I really dislike the traditional unix way  
> of installing programs on several different directories, one for  
> binaries, one for libraries, one for documentation, one for other  
> data... ugh. I also don't like the way mounting works. Even when done  
> automatically, I like it like Windows, when a new unit name is assigned  
> automatically (hence being able to access my data tersely, ie, in terms  
> of pathnames).
>

I find that mildy amusing. I see the things you are decrying as advantages
rather than disadvantages. The way to organise files is into directories.  
If you lump
everything in together you end up with billions of files at the top level.  
In
the bad old days (fortunately before I got into this business), mainframes  
had files
but not directories. Ouch!
The OS data is all under one directory / :).
User data normally resides under /home
Conceptually I don't see much difference between /mnt/C and c:
The 'proper' (google Linux Standards Base) way to install applications on  
linux is
in /opt as in
   /opt/myapp/bin
   /opt/myapp/lib
   /opt/myapp/lib64
   /opt/myapp/etc

The distinctions made between bin, lib & etc are clear and useful.
The only one that isn't intuitive is why does "etc" mean configuration but  
once you know
that it does it is not a problem.
Now I know under windows I can find the OS in /windows
and programs in program files but its very hard to tell what libraries are
associated with what programs or what is configuration versus what is data.
There's no clear distinction between 64bit and 32bit stuff either (as far  
as I know).
lib64 resolves that satisfactorily (though it is a tad ugly).
I get the impression that what standards there are for naming and placing  
'things' in windows
are less standard than we might hope.
There are similar directories under /windows but they are more diverse.
What's the difference between system & system32. Why do we need a  
/windows/twain_32.
In /windows I have .log .exe .dll  and .ini files. I'm sure these would be  
better off placed somewhere
more specific. With the exception of /windows/Sun (for java) It isn't  
obvious whether to blame windows
or some crud I install myself for what's there.
Okay there's a similar problem with /usr and /usr/local but I don't think  
its nearly as bad.

One of the biggest advantages in the Unix way of doing things is the  
virtual file system approach.
Its so useful several dynamic languages have adopted it, including Python  
and TCL.

The /proc file-system is heaven to use. All the details about a running  
process are there:
The command line,  /proc/<pid>/cmdline
the memory usage,  /proc/<pid>/meminfo
a summary status. /proc/<pid>/status
Even if you've overwritten the original exe you can still use
gdb /proc/<pid>/exe <pid> to debug the one that was actually loaded and  
run.

To output audio you can just "cat foobar.wav /dev/audio". No need to mess  
around treating a device
as anything special except when you need to do something special with it.

This sort of stuff alone is worth installing cygwin for.
Oh and hello, symbolic links. Invented centuries ago by men in caves.

Much of Unix is dated and can easily be improved upon. BeOS was very  
promising. Unfortunately it was killed by the monopoly.
I can't see Windows doing it well any time soon.
Embrace and extend seems to mean crush under jackboot and put to work in  
slave camps.
The good ideas don't die (mostly :( ) but they take a lot longer to filter  
up.






More information about the Digitalmars-d mailing list