commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
In bash, this turns on auto cd. If a command is just a directory name, it cd's into that directory.
There are 3 alternatives - vote for the best!
Alias two dots to move to parent directory. Put it into your .bashrc or .profile file.
Alias a single character 'b' to move to parent directory. Put it into your .bashrc or .profile file.
Using "cd .." is one of the most repetitive sequence of characters you'll in the command line. Bring it down to two keys 'b' and 'enter'.
It stands for "back"
Also useful to have multiple:
alias b='cd ../'
alias bb='cd ../../'
alias bbb='cd ../../../'
alias bbbb='cd ../../../../'
Use ZSH instead of bash, typing .. will move you up one directory, without the need to alias it.
If you can do better, submit your command here.
You must be signed in to comment.