On Sat, 27 Apr 2002, Samuel W. Heywood wrote:

> > 'nix systems organize files according to function.
> > Configuration files are in /etc.  Executables will be
> > in /bin, /usr/bin, /sbin, /usr/sbin depending on what
> > type of programs they are.
> 
> With DOS you can put an executable file in any directory you
> want, and it will work provided it resides somewhere in the
> current path.  Isn't the same true of Linux and Unix?

  Yup.  A binary in any directory will execute as long
as the path is in your $PATH, or you give the complete
path to it.  
 
> If you're running a GUI,
> > you'll also find executables in /usr/X11R6/bin/.  Matter
> > of fact, any time you're in any directory ending in /bin,
> > the files within will be executables.
> 
> Do Linux and Unix *require* this to be so?  

  No, binary files go in /bin directories simply for
convention; because it makes sense.
 
In my DOS machine
> I have many little executable files in a directory named C:\UTIL.
> Not all are executable.  Some are CFG files.  Also I have some DOC
> and TXT files in the same directory which explain how to use some
> of the little utility programs.  To me it makes sense to keep my
> documentation and configs for programs in the same directory where
> the programs reside.  That is just my way of doing things.  Others
> may want to organize their stuff differently.  This is just a
> matter of personal preferences.  Isn't it OK to organize your stuff
> according to your personal preferences with Linux and Unix?

  It's often done that way for 3rd party software addons.
For instance, my netscape 3.04 executable is actually at
/opt/netscape_304/netscape, and there are other 
nonexecutables there:

netscape_304]$ ls
LICENSE      XKeysymDB  movemail-src
Netscape.ad  java_301   netscape
README       movemail   
netscape-v304-export.x86-unknown-linux-elf.tar.gz


> > On many distributions, filetypes are color coded...
> 
> Steven Darnold also has a way of causing the file names to
> be shown up as color coded in his BasicLinux distro.  I don't
> know how he does it.  I haven't even tried to figure it out
> yet.  

  It's part of your environment.

$ env 

will show you which colors designate which filetypes.
Adustable in ~/Xrootenv.0

> I don't know if i can set up a color coding scheme on my
> Unix shell.

  Of course it's possible, but I'm not aware of any "out of 
the box" way of doing it.

> Is it "illegal" with Linux to put a non-executable in a
> "bin" directory?  I don't know.  I'm a newbie.

  Nope, just nonsensical.  Would you put a bolt in a 
jar labeled "Nuts?"  Or put your Leave and Earnings 
statement into a file folder named "Expenses?"
Directories are simply organizational tools.  You can put 
anything anywhere you want, but why bother if it ends up 
being at cross purposes of the goal of "organization" or
"ease of use?"

> OK, thanks.  As you know, I still have very much more to learn
> about Linux and Unix.

  The shift from DOS to 'nix really is a completely 
different way of looking at things.  Don't expect it all to 
fall into place overnight.

-- 
Steve Ackman
http://twoloonscoffee.com       (Need green beans?)
http://twovoyagers.com          (glass, linux & other stuff)

Reply via email to