You are on page 1of 10

Diaster Recovery approach for network Ttraffic redirection

Red Hat - File Management

JUNE 2014

raj janwa
Red Hat - File Management
Topics

Linux File System Hierarchy 3


Navigate with Absolute Path Names 5
Command Line File management 7
Navigate with Relative Path Names 10
1. Linux File System Hierarchy

In Linux operating systems, File systems are organized into hierarchy, organized
like an inverted tree. The root of the tree is / directory.
Each Directory in the file system has a standardized use specified.

Most configuration files are stored in /etc directory and its subdirectories.

Executable commands are kept in /usr/bin or /bin to be accessible ny all users.


Some Administrative commands may be kept in /usr/sbin or /sbin.

The /var directory contains regulary changing system files such as logs, print
spools and email spools.

/tmp is usually used by the applications for storing temporary data. Once a day
the system automatically deletes any files over ten days old in /tmp, if specified.

The boot loader is in charge of loading the core of Red-Hat Enterprise Linux,
called Kernal, into memory. The boot loader, kernel and loaders configuration
files are stored in /boot.

One fundamental principle of Linux system is that everything is a file,


including hardware devices. So, there some special files and the system which
represents hardware devices, which are kept in the /dev directory and its
subdirectories.

Every user has a home directory. All of users personal files stored here. Roots
home directory is /root. Most non-root home directories are in the /home tree,
usually named after the user.

When removable media is loaded the file system on the media is mounted into a
subdirectory of /media.
2. Navigate with Absolute Path Names

An absolute path name always begin with a forward slash (/), identifying the
complete file name starting from the root directory, through any intervening
directories, to the name of the file. On linux, the / character is the directory
separator in the path.

So, for example /bin is the bin file or directory in the /.

Another example, the file /home/bowe/file.txt is the file.txt file in the bowe
subdirectory of the home directory, which is in /.

An absolute path name represents a unique name for a file on the file system.
Path names can be used as arguments to any command that takes a file name
argument.

Two special path names are ~, which is an abbreviation for the absolute path
name for the current users home directory and ~user, which abbreviates the
absolute path name for the directory of that user specified.
pwd command prints the absolute path to your current working directory. You
can change your current directory with cd command.
3. Command Line File Management

Some commands to manage files in the Linux system:

cd --- to change the current directory


ls l --- to list the contents of the directory
ls l d* --- the asterisk(*) used to match zero or more characters.
touch --- to create an empty file
cp --- to copy a file from one directory to another
mv --- to move a file from one directory to another
rm --- to remove a file on linux file system

mkdir --- to create a directory


rmdir --- to remove an empty directory
rm rf --- to remove a directory
4. Navigate with Relative Path Names

Relative path names begins with either . ( = your current working directory) or
.. ( = the parent of your current working directory ). It uses forward slash (/) to
seprate directories in the path name.

Relative path names changes with the current working directory.

You might also like