$cd command

praveenlearner: About cd command
Changes the directory.

Syntax

cd [directory]

directory -> Name of the directory user wishes to enter.

cd .. -> Used to go back one directory on the majority of all Unix shells. It is important that the space be between the cd and the ..

cd – -> When in a Korn shell to get back one directory used to go back one directory.

Examples

cd praveen

The above example would go into the praveen directory if it exists.

cd ../home/users/praveenlearner

The above example would go back one directory and then go into the home/users/praveenlearner directory.

cd ../../

Next, the above example would go back two directories.

cd

Finally, typing just cd alone will move you into the home directory. If you’re familiar with MS-DOS and how typing cd alone prints the working directory. Linux and Unix users can print the working directory by using the pwd command.

With Regards,
S. Praveen

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s