cd [dir]
Changes the current working directory (i.e. what pwd reports) to the specfied directory. If no directory is specified the default behavior is to go to the users home directory.
linux3[43]% pwd /afs/umbc.edu/users/d/h/dhood2/home/examples linux3[44]% cd foo linux3[45]% pwd /afs/umbc.edu/users/d/h/dhood2/home/examples/foo linux3[46]% |
The special character . always means this directory.
The special characters .. always means the parent directory.
linux3[47]% pwd /afs/umbc.edu/users/d/h/dhood2/home/examples/foo linux3[48]% cd .. linux3[49]% pwd /afs/umbc.edu/users/d/h/dhood2/home/examples linux3[50]% |
The special char ~ always means your home directory
linux3[52]% pwd /afs/umbc.edu/users/d/h/dhood2/home/examples/foo linux3[53]% cd ~ linux3[54]% pwd /afs/umbc.edu/users/d/h/dhood2/home linux3[55]% |