Man page - bd(1)
Packages contains this manual
Manual
bd
NAMESYNOPSIS
DESCRIPTION
OPTIONS
NOTES
OTHER USES
AUTHOR
NAME
bd - quickly go back to a specific parent directory in bash
SYNOPSIS
DESCRIPTION
bd allows you to go to . parent directory in bash instead of typing "cd ../../.." redundantly.
You can simply type bd with starting few letters and it will auto complete the directory name.
It can be used with other commands such as ls, ln, echo, zip, tar, etc.
OPTIONS
|
-si |
It is not necessary type the full directory name (meaning starts with) and just give the starting few characters. |
||
|
-. |
Enable case-sensitive directory name matching. |
NOTES
To avoid to have to use "." and " -si /- . " every time, you can add the line below in your .bashrc file:
echo βalias bd=". bd -si"β >> Λ/.bashrc
And then, do:
source Λ/.bashrc
OTHER USES
Using bd within backticks (β bd <letter( . )>β) prints out the path without changing the current directory .
You can take advantage of that by combining β bd <letter( . )>β with other commands such as ls, ln, echo, zip, tar etc.
Examples:
If you just want
to list the contents of a parent directory, without going
there, then you can use:
ls βbd pβ in the given example, it will list the
contents of /home/user/project/
If you want to
execute a file somewhere in a parent directory, βbd
pβ/build.sh will execute
/home/user/project/build.sh while not changing the current
directory.
If you reside in
/home/user/project/src/org/main/site/utils/file/reader/whatever
and want to change to
/home/user/project/test, then try cd βbd
pβ/test
AUTHOR
The BD was written by Vigneshwaran Raveendran <vigneshwaran2007@gmail.com>.
This manual page was written by Paulo Henrique de Lima Santana (phls) <phls@debian.org> for the Debian project (but may be used by others).