Cd Command – UNIX

Cd Command UNIX

Description

cd is short of change directory.

As name suggests cd command is used to change the present working directory.

Options

Following options can be used with the cd command:

-L force symbolic links to be followed
-P use the physical directory structure without following symbolic links

Examples

Example 1:

Change the current working directory to /home/epw/sub_epw/sub_epw1

$ cd /home/epw/sub_epw/sub_epw1
$

$ pwd
/home/epw/sub_epw/sub_epw1
$

Example 2:

Chaging the directory to physical link instead of any symbolic link

$ cd epw/sub_epw/sub_epw2
$

$ pwd
$epw/sub_epw/sub_epw_phycial_link