User:Tancre/Others/Usefull commands

From XPUB & Lens-Based wiki
< User:Tancre‎ | Others
Revision as of 23:44, 23 January 2019 by Tancre (talk | contribs)

pushd <directory> is equivalent to cd <directory> but, in addition, <directory> is put on top of a directory pile.

popd remove the last directory saved in the pile and change directory to the directory on top of the pile.

dirs allows you to see the state of the pile.


! replay a previous command using a shebang
$ ls -lt
$ !ls

:p to verify the parameter before replaying it
$ !ls:p
ls -lt


!$ reuse the last command parameter
~ $ mkdir toto
~ $ cd !$
~/toto $