On Sat, 27 Apr 2002 12:51:12 -0400 (EDT), Steve <[EMAIL PROTECTED]> wrote:
> On Sat, 27 Apr 2002, Samuel W. Heywood wrote: >> One of the nice things about DOS files is that most of them >> have file extensions so as to give the user some idea as to >> what kinds of files they might be. >> Most of the files we see in a Linux distribution and many of >> the files we find on a Unix host have no file extensions. We >> have no immediate clue as to what kinds of files they are. >> Why? > Many files do have such extensions. Look in /etc. > You'll probably find lots of files with .cfg, .conf, or > ..config extensions. Can you guess what these are for? Many do, but most don't. > All the html files on my web server have *html extensions. > If I want to include PHP in the web page, then it needs to > have a .php3 on it. > Compressed packages have .zip, .gzip, .tgz, tar.gz, etc. > extensions. Red Hat packages have .rpm extensions. Debian > packages have .deb extensions. > Sound files have .wav, .mp3, .ogg, .au, etc. > Multi-media have .avi, .mpg, .ppt, etc. > In DOS, files are grouped according to their "package." > IOW, all the arachne files will be found under C:\ARACHNE. > In order to differentiate what all those unorganized files > are for, extensions are handy. > '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? 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? 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? > And yes, some executables have extensions that let you > know what kind of executable they are. You can have .cgi, > ..sh, .pl, .php3, .py, .jar, etc. Yes. I find that true with DOS also. In DOS we have EXE, COM, and BAT, for example. All of the DOS executables have file extensions, but not all Linux executables have file extensions. > In order to tell for sure, use 'ls -l' for a full > directory listing instead of just filenames. That > tells you who has read, write, and execute permissions > for that file. If there are no x attributes, the > file is not executable. Some files are executable only > for their owners, while some are executable only by their > groups, and others by anyone. > Of course, in your home directory, you can have whatever > kind of (dis)organization you wish. > On many distributions, filetypes are color coded. > When I do ls, or any derivative, all executable files > are shown green. Tarballs, rpm files, and anything > compressed, shows up red. Directories are blue. > Graphic files are magenta. Links are teal. 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. I don't know if i can set up a color coding scheme on my Unix shell. > In many Linuces, it is IMMEDIATELY obvious what any > filetype is without even looking for an extension... so > extensions are often redundant because of the directory > you're in, and then doubly redundant when filetypes are > color coded. Is it "illegal" with Linux to put a non-executable in a "bin" directory? I don't know. I'm a newbie. > When it makes sense, use them. When I write out files > from Word Perfect, I add either a .wpd or .ps suffix > so I'll know later what "reader" to use for it. > When I create plain ascii files, I use a .txt extension. > Bottom line is pre-existing files without extensions > really don't need them, and any files you add can have > them or not, depending on your preference/requirement. OK, thanks. As you know, I still have very much more to learn about Linux and Unix. Sam Heywood -- This mail was written by user of The Arachne Browser - http://arachne.cz/
