Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ctemplin/a164a5ac49279715df31d7c35a004ed9 to your computer and use it in GitHub Desktop.
Save ctemplin/a164a5ac49279715df31d7c35a004ed9 to your computer and use it in GitHub Desktop.
Locate directories that contain string. Example query: 'bash-completion'
# lists matching non-dirs too after dirs
ls -dp --group-directories-first `locate -b '\bash*completion'`
@ctemplin
Copy link
Author

A lot faster than find -name [string].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment