From FreeBSDwiki
Revision as of 01:34, 11 September 2004 by Dave (Talk | contribs)
Jump to: navigation, search

Under FreeBSD and other unixlike OSes, cd means just what it does under Windows - "change directory."

The notable differences being that under unixlike OSes a space is required between cd and the name of the directory to change to and a forward slash / is used instead of a backward slash \

C:\Windows> cd\stuff (windows)
splat# cd /stuff     (unixlike)
C:\Windows> cd..     (windows)
splat# cd ..         (unixlike)

cd by itself will send you to your home directory, as will cd ~. cd - will show you and then change your directory to the last directory you were in, as below:

[dave]@deus /var/log % cd ~
[dave]@deus ~ % cd /etc
[dave]@deus /etc % cd -
[dave]@deus ~ %
Personal tools