Directories


Files contain the information you work with. Directories provide a way to organize your files. A directory is just a container for as many files as you care to put in it. If you think of a file as analogous to a document in your office, then a directory is like a file folder. In fact, directories in UNIX are exactly like folders in Windows.

For example, you may decide to create a directory to hold all of your notes. You could name it Notes and use it to hold only files that are your notes, keeping them separated from your e-mail, programs, and other files.

Subdirectories

A directory can also contain other directories. A directory inside another directory is called a subdirectory. You can create as many subdirectories inside a particular directory as you wish.

Choosing Directory Names

It is a good idea to adopt a convention for naming directories so that they can be easily distinguished from ordinary files. Some people give directories names that are all uppercase letters, some use directory names that begin with an uppercase letter, and others distinguish directories using the extension .d or .dir. For example, if you decide to use names beginning with an uppercase letter for directories and avoid naming ordinary files this way, you will know that Notes, Misc, Multimedia, and Programs are all directories, whereas note3, misc.note, mm_5, and progmmA are all ordinary files.




UNIX. The Complete Reference
UNIX: The Complete Reference, Second Edition (Complete Reference Series)
ISBN: 0072263369
EAN: 2147483647
Year: 2006
Pages: 316

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net