Unix programming reference
3 answers
From, /usr/local/bin
you can use an absolute path:
$ cd /usr/home/amrood
Or a relative path:
$ cd ../../home/amrood
But no /usr/home/user
. To get into the user's current directory, you must use the shortcut ~
:
$ cd ~
$ pwd # /home/user
The double dot means "go to the parent directory".
So, for example, from the user's starting point:
$ pwd # /home/user
$ cd ..
$ pwd # /home
+1
source to share