I use "cd -" to jump back and forth between two directories.
Is there a command that will rotate between three directories?
|
I use "cd -" to jump back and forth between two directories. Is there a command that will rotate between three directories? |
|||
|
There are commands (builtins) to maintain a stack of directories: |
|||||||||
|
|
|
|||
|
|
|
First add the second and third directories to the directory stack (your working directory is already in the stack).
Then rotate through your directories with the following command:
|
|||
|
|
|
pushd/popd and $DIRSTACK solutions proposed in other answers are the "canonical" way. Another option would be to use Check all possible window navigation shortcuts. |
|||
|
|
|
Try using 'z' link. It remember which directories you have been to and you can jump around with short commands and abbreviated directory names. |
|||
|
|
|
i have the following in my .alias file, this allows me to go down a number of directories from wherever. (could also put in your .bashrc)
|
|||
.bashrcfile. If you add a full path you can use simple commands to jump between the directories. – Eugene S Feb 23 '12 at 9:57