Skip to content

Instantly share code, notes, and snippets.

@techie2000
Created December 15, 2020 09:20
Show Gist options
  • Save techie2000/55bafb10a801f9a09d36d6f32dda8547 to your computer and use it in GitHub Desktop.
Save techie2000/55bafb10a801f9a09d36d6f32dda8547 to your computer and use it in GitHub Desktop.
Find all files with given (part) name
find . -name '*.foo'
@techie2000
Copy link
Author

Find files and perform an action on them

find . -type f -name '*.txt'      \
   -exec grep -q 'hello' {} ';'   \
   -exec cat {} ';'

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