www.LinuxHowtos.org

edit this article

Quick 'cd' trick

To return to the previous directory in the shell (bash, ksh, zsh, etc), use cd -

Code Listing 1

$ pwd 
/home/rd 
$ cd /tmp 
$ cd - 
$ pwd 
/home/rd

From http://www.gentoo.org/news/en/gwn/20040524-newsletter.xml


rate this article:
current rating: average rating: 1.3 (62 votes) (1=very good 6=terrible)
Your rating:
Very good (1) Good (2) ok (3) average (4) bad (5) terrible (6)

back