Search PPTs

Wednesday, July 24, 2013

PPT On Unix Directory Management

Presentation On Unix Directory Management

Unix Directory Management Presentation Transcript:
1.Unix - Directory Management

2.A directory is a file whose sole job is to store file names and related information. All files, whether ordinary, special, or directory, are contained in directories.
UNIX uses a hierarchical structure for organizing files and directories. This structure is often referred to as a directory tree . The tree has a single root node, the slash character ( /), and all other directories are contained below it.

3.Home Directory:
The directory in which you find yourself when you first login is called your home directory.
You will be doing much of your work in your home directory and subdirectories that you'll be creating to organize your files.
You can go in your home directory anytime using the following command:
$cd ~

4.Here ~ indicates home directory. If you want to go in any other user's home directory then use the following command:
$cd ~username
To go in your last directory you can use following command:
$cd –

5.Absolute/Relative Pathnames:
Directories are arranged in a hierarchy with root (/) at the top. The position of any file within the hierarchy is described by its pathname.
Elements of a pathname are separated by a /. A pathname is absolute if it is described in relation to root, so absolute pathnames always begin with a /.
These are some example of absolute filenames.

A pathname can also be relative to your current working directory. Relative pathnames never begin with /. Relative to user amrood' home directory, some pathnames might look like this:
chem/notes personal/res

To determine where you are within the filesystem hierarchy at any time, enter the command pwd to print the current working directory:
$pwd /user0/home/amrood $

8.Listing Directories:
To list the files in a directory you can use the following syntax:
$ls dirname
Following is the example to list all the files contained in /usr/local directory:
$ls /usr/local
X11     bin     gimp         jikes         sbin
ace     doc     include     lib         share
atalk     etc     info         man         ami

9.Creating Directories:
Directories are created by the following command:
$mkd dirname
Here, directory is the absolute or relative pathname of the directory you want to create. For example, the command:
$mkdir mydir $
Creates the directory mydir in the current directory. Here is another example:
$mkdir /tmp/test-dir $

10.This command creates the directory test-dir in the /tmp directory. The mkdir command produces no output if it successfully creates the requested directory.
If you give more than one directory on the command line, mkdir creates each of the directories. For example:
$mkdir docs pub $Creates the directories docs and pub under the current directory.

No comments:

Related Posts Plugin for WordPress, Blogger...

Blog Archive