Quick directory switching
At work, I do a lot of directory traversal: going from one location to another within the whole (global) filesystem structure. So, to conveniently go back to a previous directory, I use
You can even
pushd and popd, aside from the usual cd:
$ pwd
/home/iandexter
$ pushd /etc/sysconfig
$ pwd
/etc/sysconfig
$ popd
$ pwd
/home/iandexter
You can even
echo $DIRSTACK to list the current directories in the stack, and push multiple directories.
If you're familiar with FRIENDS, a line was said in one episode, that goes something like: "I know you're talking but all I hear is BLAH BLAH BLAH..." Hee. Have a fine weekend. God Bless.
ReplyDeletehow about cd -
ReplyDeleteThanks, brainbox.
ReplyDeleteBut `cd -` works on a single level only. `pushd` and `popd` are bash only, though -- not available in ksh. Then again, I'm almost always into bash.