-
Notifications
You must be signed in to change notification settings - Fork 0
fcd Command Help
MattFlower edited this page Jan 15, 2013
·
1 revision
fcd -some_string-
Searches all directories starting at the current one for a file which starts with the string -some_string-. If there is only a single file found, you will immediately be switched to that directory. If there are more than one directory found, you will receive a list of matching directories and you can choose one.
Note that fcd supports the autocompletion functionality in bash. Just use the tab key to complete a word you are typing. This will invoke find on the entire directory tree under your current word, so use it wisely.
If you were currently in the directory /home/mflower and the following directories were present:
/home/mflower/code/test1
/home/mflower/code/test2
/home/mflower/code/oldcode
Here are a list of commands and what they would do:
/home/mflower$ fcd test1
/home/mflower/code/test1$ cd ../..
/home/mflower$ fcd test
Please choose a directory to change to
--------------------------------------
1. ./code/test1
2. ./code/test2
Your choice: 2
/home/mflower/code/test2$ cd ../..
/home/mflower$ fcd asdf
No matching directories were found
/home/mflower$