Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fun Linux Tip O' The Day...
Message
 
À
Tous
Information générale
Forum:
Linux
Catégorie:
Autre
Titre:
Fun Linux Tip O' The Day...
Divers
Thread ID:
00435973
Message ID:
00435973
Vues:
34
So you are editing your website, writing some C code, or just cleaning up your system. Man does it suck typing in pathnames all day long.
If you are using a BASH shell, you're in luck.

help pushd
help popd

pushd and popd are two bash commands that help build a directory stack. Let's say you are in /home/foo and you want to go to /usr/local/apache/htdocs/html-www to mess with some files, them come back.

[foo@bar foo]$ pushd /usr/local/apache/htdocs/html-www

Now, the directory stack has /home/foo on top (it is probably the only one)
So you do whatever, then you want to go back

[foo@bar html-www]$ popd
[foo@bar foo]$

And you are back. Inbetween the commands the directory stack is printed out.

Enjoy.

j
Jason Bradley Nance
jbnance@tresgeek.net

Got root?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform