10 Expert Ubuntu Tricks
Apr 14, 2009, 17:34 (0 Talkback[s])
(Other stories by Keir Thomas)
"4. Add Directories To the Directory Stack With PUSHD
"While we're on the subject of directories, let's talk about the
directory stack. Quite simply, this is a list of directories stored
by bash. The currently-browsed directory always tops the list, but
the list is otherwise empty until you add a new directory, which
you can do using the pushd command. For example, pushd /usr/bin
will add /usr/bin. It will also switch you to that directory, so
you could use it instead of cd to navigate (the -n command option
will let you add a directory but stay where you are). The dirs
command will show the directory list (remember that the
currently-browsed directory will always be at the top). popd
deletes the topmost entry in the list, and switches you to the next
in the list. Give the directory list a try. It can be very useful
if you're administering a system and have to leap from directory to
directory, and are inclined to forget where important things
are."
Complete Story
Related Stories:
- Making the Future Happen In Linux(Apr 09, 2009)
- Running Complex Commands with sudo(Apr 03, 2009)
- Docdiff compare - Good! + Roundup(Mar 24, 2009)
- Thunar File Browser: Tips, Tricks and Scripts(Mar 22, 2009)
- Colorize grep output(Mar 16, 2009)
- 8 Essential Vim Editor Navigation Fundamentals(Mar 12, 2009)
- More Linux tips every geek should know(Mar 06, 2009)
- 10 ways to go green with Linux(Mar 05, 2009)
- Mommy, I found it! -- 15 Practical Linux Find Command Examples(Mar 04, 2009)
- Linux tips every geek should know(Mar 02, 2009)
- Smart tips and tricks to get the best from KDE 4(Feb 23, 2009)