Developer's Daily Unix by Example
  main | java | perl | unix | DevDirectory
   
Main
Unix
Education
Unix by Example
   

 

Command cd
Description "cd" stands for change directory. It is the primary command for moving around the filesystem.
Examples cd /usr

This command moves you to the "/usr" directory. "/usr" becomes your current working directory.

cd /usr/fred

Moves you to the "/usr/fred" directory.

cd /u*/f*

Moves you to the "/usr/fred" directory - if this is the only directory matching this wildcard pattern.

cd

Issuing the "cd" command without any arguments moves you to your home directory.

cd -

Using the Korn shell, this command moves you back to your previous working directory. This is very useful when you're in the middle of a project, and keep moving back-and-forth between two directories.



What's related

copyright 1998-2007, devdaily.com, all rights reserved.
devdaily.com, an alvin j. alexander production.