Programming Tutorials

cd in Mac OS X

By: Strauss K in macos Tutorials on 2011-02-03  

cd stands for "change directory" and is used to change the current working directory in the terminal. It is a shell command that is available in most Unix-like operating systems, including Mac OS X.

The basic syntax of the cd command is:

cd [directory]

where directory is the path of the directory you want to change to. If no directory is specified, cd changes the current working directory to your home directory.

Here are some examples:

  • To change to the root directory: cd /
  • To change to a directory called "Documents" in your home directory: cd ~/Documents
  • To change to the parent directory: cd ..
  • To change to the previous directory: cd -

Note that cd can only be used to navigate to directories that the user has permission to access.






Add Comment

* Required information
1000

Comments

No comments yet. Be the first!

Most Viewed Articles (in macos )

Latest Articles (in macos)