Files are located in directories or subdirectories. We can find these by using their pathname. A path name consists of a slash followed by a sequence of slashes and directory names. The target file is the file you want to specify.
The first slash before the directory tree route makes a big difference in how this path is interpreted.
Two kinds of path names:
1. Full path name/ Absolute path name
2. Relative path name.
It's easier to find any particular file if your home directory is well stored.
ABSOLUTE PATH NAME:
RELATIVE PATH NAME:
Full path name begins with slash (/) followed by the sequence of directories from the root to the target file or directory. Relative path name does not begin with a slash (/) and assumes a starting location of the current working directory.
To make an Absolute path name
Example:- $ ls /home/alpha/data
a, b , c, - files
data - current directory
work - home directory
To make as Relative path name
List the subdirectory sub, it contains d ,e and f as files.
$ ls sub
Obviously d file stored in the sub directory sub. can read the file d directly from our current working directory by:
$cd../../ram - change the current directory
$more ../. setup
$pwd - Print working directory/ display path name.
$ls - F - Display directory /Subdirectory
Upload your original content. We will publish your material under your name on W3Professors after review.
Without your feedback, such words as Improvement, Achievement and Success have no meaning for us.
Designed and Maintained by Kanwer Technologies