Monday, July 23, 2012

File/Directory System in Ubuntu

File/Directory System in Ubuntu

File/Directory System in Ubuntu : In Ubuntu all filesystems are contained within one directory hierarchy. The root directory is the top level directory, and all its sub directories make up the directory hierarchy. This Directory differs to other operating systems such as MS-Windows or may be even Mac which applies a separate hierarchy for each device and partition. So lets Try to understand what are all the important Directories and File systems which you might get by default.This Directory is actually very important to know because if we know them , we can certainly be the quickest among our colleagues.

The Most Important Directories are as follows :

/lib : This Directory has the Libraries , These are the system libraries similar to Program Files commonly we call them libraries.
/bin : This Directory has the binary executable files what we usually call as binaries.
/boot : This Directory has the files required to boot such as the kernel etc.
/dev : This Directory has devices everything from drives to displays like Disc drivers.
/etc : This Directory has configuration files for your system.
/home : This Directory has locally stored user files and folders.

The usual Directories for Daily use are as follows :

/lost+found : This Directory has lost and found for lost files.
/media : This Directory has mounted or loaded devices such as cdroms, digital cameras, etc.
/mnt : This Directory has mounted file systems.
/opt : This Directory has location for “optionally” installed programs.
/proc : This Directory has dynamic directory including information about and listing of processes.
/root : This Directory has the “home” folder for the root user
/sbin : This Directory has system-only binaries.
/sys : This Directory contains information about the system
/tmp : This Directory has temporary files
/usr : This Directory has applications mainly for regular users.
/var : This Directory has mainly logs, databases, etc.

Some Important Files are as follows  :

/etc/profile.d : This Directory contains scripts that are run by /etc/profile upon login.You can put the scripts here which can be run at every startup.
/etc/rc.d : This Directory has contains a number of shell scripts that are run on boot up at different run levels. There is also typically an rc.inet1 script to set up networking , an rc.modules script to load modular device drivers, and an rc.local script that can be edited to run commands desired by the administrator, along the lines of autoexec.bat in DOS.Normally we have all the scripts which we want to run on the boot time like we want to run a health checkup scripts in our production servers just at the log in.
/etc/rc.d/init.d : This Directory contains most of the initialization scripts themselves on an rpm-based system.
/etc/rc.d/rc*.d : Now where “*” is a number corresponding to the default run level. Contains files for services to be started and stopped at that run level. On rpm-based systems, these files are symbolic links to the initialization scripts themselves, which are in /etc/rc.d/init.d.
/etc/skel : This Directory directory containing several example or skeleton initialization shells. Often contains sub directories and files used to populate a new user’s home directory.
/etc/X11 : This Directory configuration files for the X Window system
/usr/local/bin : This Directory the place to put your own programs. They will not be overwritten with upgrades.
/usr/share/doc : This Directory has all the documentation.
Enjoy Playing with Files and directories.

No comments:

Post a Comment