Skip to content

Instantly share code, notes, and snippets.

@toashd
Created March 17, 2018 18:27
Show Gist options
  • Save toashd/2e500beb8af23c5b84e5a90c55fe5648 to your computer and use it in GitHub Desktop.
Save toashd/2e500beb8af23c5b84e5a90c55fe5648 to your computer and use it in GitHub Desktop.
Find first folder name that contains a string
find <dir> -maxdepth 1 -type d -name '*foo*' -print -quit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment