Saturday, April 21, 2007

Home Directory

A home directory is a directory in a file system that is associated with your user account. It is "owned" by you and you can control, through a permissions system, who has access to it and what kind of access they have.

Your home directory will be used to store user specific configuration files for various applications, data for those applications, and any other files which you may choose to store there.

You may create subdirectories to organize your files. Certain directory names have special meaning to applications. For example, a directory called 'mail' is used by most mail applications to store mail folders.

Files and directories starting with '.' are "hidden", and do not normally show up in the output of the 'ls' command (which lists contents of a directory analogous to 'dir' in Windows). The 'ls' command can be given a '-a' flag to tell it to show the hidden directories as well.

Directories exist in a tree hierarchy. Unix and Unix-like operating systems have just one tree with a common root, Windows usually has separate trees for each disk device, however, newer incarnations of Windows support mounting a device in a manner similar to Unix-like operating systems.

There are two special hidden directories, '.' refers to the current directory, and '..' refers to the parent directory.

In Unix-like operating systems, the path separator character is '/' rather than '\' used in Windows. In Unix-like operating systems, the '\' character has a different use, it is used to escape characters that have special meanings and cause them to be treated like an ordinary character.

A typical path to a users home directory in a Unix-like operating system might look something like this:
/users/geek
However, some systems might break it down further in order to limit the number of subdirectories in one directory and thus have a more complex path such as:
/u/g/geek
Unix-like operating systems will place the path to your home directory in an environmental variable called $HOME when you login, thus you can refer to your home directory as $HOME regardless of the actual path.

The subdirectories you create need not all have the same permissions. It is thus possible to create a directory with public read access with files that you wish to make publicly available and a directory without public read access for files which you prefer to keep private.

In addition to user specific applications configuration information and applications data, your home directory may contain arbitrary files you choose to keep there, collections of photographs, audio files, or video files for example. Many users might wish to create or compile their own application programs and so you may wish to create a subdirectory for executable programs.

As with the disk space on your home computer, what you choose to store in your home directory is limited by your imagination. Unlike your home computer, you can access this information from anywhere on the Internet.

0 Comments:

Post a Comment

<< Home

Google