Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Debian GNU/Linux Reference Guide
Prev Home Next

4.5.1 Unix file basics

Here are the basics:

  • Filenames are case sensitive. That is, MYFILE and MyFile are different files.

  • The root directory is referred to as simply /. Don't confuse this "root" with the root user. See Login to a shell prompt as root, Section 4.1.1.

  • Every directory has a name which can contain any letters or symbols except /. [ 31] The root directory is an exception; its name is / (pronounced "slash" or "the root directory") and it cannot be renamed.

  • Each file or directory is designated by a fully-qualified filename, absolute filename, or path, giving the sequence of directories which must be passed through to reach it. The three terms are synonymous. All absolute filenames begin with the / directory, and there's a / between each directory or file in the filename. The first / is the name of a directory, but the others are simply separators to distinguish the parts of the filename.

    The words used here can be confusing. Take the following example:

         /usr/share/keytables/us.map.gz
    

    This is a fully-qualified filename; some people call it a path. However, people will also refer to us.map.gz alone as a filename. [ 32]

  • The root directory has a number of branches, such as /etc/ and /usr/. These subdirectories in turn branch into still more subdirectories, such as /etc/init.d/ and /usr/local/. The whole thing together is called the directory tree.

    You can think of an absolute filename as a route from the base of the tree (/) to the end of some branch (a file). You'll also hear people talk about the directory tree as if it were a family tree: thus subdirectories have parents, and a path shows the complete ancestry of a file.

    There are also relative paths that begin somewhere other than the root directory. You should remember that the directory ../ refers to the parent directory.

  • There's no directory that corresponds to a physical device, such as your hard disk. This differs from CP/M, DOS, and Windows, where all paths begin with a device name such as C:\. See The filesystem concept in Debian, Section 4.5.2.

The detailed best practices for the file hierarchy are described in the Filesystem Hierarchy Standard. You should remember the following facts as the starter:

  • /

    • A simple / represents the root directory.

  • /etc/

    • This is the place for the system wide configuration files.

  • /var/log/

    • This is the place for the system log files.

  • /home/

    • This is the directory which contains all the home directories for all non-privileged users.


Debian GNU/Linux Reference Guide
Prev Home Next

 
 
  Published under the terms of the GNU General Public License Design by Interspire