Thursday 30 November 2017

Data Directories in Linux

DATA DIRECTORIES



Users can store personal or project data under /home. It is common (but not mandatory by the Filesystem Hierarchy Standard) practice to name the users home directory after the user name in the format /home/$USERNAME. For example:
abc@lab0:~$ ls /home
imran farhan xyz umar
Besides giving every user (or every project or group) a location to store personal files, the home directory of a user also serves as a location to store the user profile. A typical Unix user profile contains many hidden files (files whose file name starts with a dot). The hidden files of the Unix user profiles contain settings specific for that user.
abc@lab07:~$ ls -d /home/imran/.*
/home/imranl/.                      /home/imran/.bash_profile           /home/imran/.ssh
/home/imran/..                      /home/imran/.bashrc                     /home/imran/.viminfo
/home/imran/.bash_history /home/imran/.lesshst

/root

On many systems /root is the default location for personal data and profile of the root user. If it does not exist by default, then some administrators create it.

/srv

You may use /srv for data that is served by your system. The FILESYSTEM HIERARCHY STANDARD allows locating cvs, rsync, ftp and www data in this location. The FILESYSTEM HIERARCHY STANDARD also approves administrative naming in /srv, like /srv/project55/ftp and /srv/sales/www.
/export is used for this purpose on Sun Solaris (or Oracle Solaris).

/media

The /media directory serves as a mount point for removable media devices such as CDROM's, digital cameras, and various usb-attached devices. Since /media is rather new in the Unix world, you could very well encounter systems running without this directory. Solaris 9 does not have it, Solaris 10 does. Most Linux distributions today mount all removable media in /media.
imran@debian5:~$ ls /media/
cdrom cdrom0 usbdisk

/mnt

The /mnt directory should be empty and should only be used for temporary mount points (according to the FILESYSTEM HIERARCHY STANDARD). Unix and Linux administrators used to create many directories here, like /mnt/something/.
You likely will encounter many systems with more than one directory created and/or
mounted inside /mnt to be used for various local and remote file systems.

/tmp

Applications and users should use /tmp to store temporary data when needed. Data stored in /tmp may use either disk space or RAM. Both of which are managed by the operating system. Never use /tmp to store data that is important or which you wish to archive.







No comments:

Post a Comment