Skip to content

q3yi/find-dir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fdir(find directory)

Find all folders in the given root directory that contain the specified folder or file.

For examples:

Find all git projects in ~/repos folder:

> fdir ~/repos

Find all rust projects in folder:

> fdir --has "Cargo.toml" ~/repos

After finding all the folders, combining them with the fzf and cd commands allows us to quickly navigate to the desired project or file directory.

cd $(echo $REPOS | xargs fdir | fzf)

Similar effects can also be achieved using the find or fd tools, but they cannot stop searching their subdirectories once a matching directory is found. For large projects with many subdirectories, this can consume more time, so I decided to optimize the process."

About

Find all folders in the given root directory.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages