lkakrex.blogg.se

Shotcut for linux
Shotcut for linux






The clearest explanation is in this very useful article and is exactly the way I use pushd and popd:įirstly, use dirs or dirs -l to list directories on the stack and dirs -c to clear the stack. There are no separate manpages for the commands, as they are included in the Bash manpage, but for quick reference you can view the GNU Bash page. It takes a bit of getting used to, but there are plenty of useful tutorials out there at this blog and this this site for example. The dirs builtin displays the contents of the directory stack. The pushd builtin adds directories to the stack as it changes the current directory, and the popd builtin removes specified directories from the stack and changes the current directory to the directory removed. In contrast to the autojump bookmarks mentioned by burger.ga, the directory stack created by using pushd is only temporary.Īs the GNU manual notes, pushd and popd are Bash builtins used to construct a temporary directory stack that is a More information here: (also instruction on how to install this from src which gets you the most recent version)Įven though there are some good answers already, I thought I'd mention for completeness the old pushd and popd Bash builtins with allow you to move very quickly between directories in deep paths in your filesystem. To install you can just use sudo apt-get install autojump and then you need to add source /usr/share/autojump/autojump.bash Stuff_1_/home/user/this/long/and/annoyingly/deep/directory/workstuffĪnd then you can just press the number of the directory you want! However it gets better! If you also have the directory /home/user/stuffĪnd then Tab Tab Tab you get (in the order of most visited) $ j stuff_ If more than one directory matches you jump to the one that is most visited, if this is not the one you wanted, then repeat the command to go to the second. Then if you have visited it once you can jump to it by j workstuffīecause it also works with partial matches. So for instance you have /home/user/this/long/and/annoyingly/deep/directory/workstuff Also have a look at autojump, it builds a database with previously visited directories and then you can jump to it.








Shotcut for linux