Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: "cd -" Command  (Read 2260 times)

0 Members and 1 Guest are viewing this topic.

sajay

  • Guest
"cd -" Command
« on: December 01, 2013, 08:41:11 pm »
A useful shortcut with cd is to just type cd - to go to the previous directory i.e the directory or path which you where in before not the one

For Example:

Quote
root@backup02 [/home/scp]# pwd
/home/scp
root@backup02 [/home/scp]# cd /home/test/
root@backup02 [/home/test]# pwd
/home/test
root@backup02 [/home/test]# cd -
/home/scp
root@backup02 [/home/scp]# pwd
/home/scp
root@backup02 [/home/scp]# cd -
/home/test
root@backup02 [/home/test]# pwd
/home/test
root@backup02 [/home/test]#