Skip to content

Instantly share code, notes, and snippets.

@544
Forked from thisivan/find_command_samples.sh
Created April 14, 2011 19:28
Show Gist options
  • Save 544/920272 to your computer and use it in GitHub Desktop.
Save 544/920272 to your computer and use it in GitHub Desktop.
# Find text in files
find | xargs grep 'text to find' -l
# Find and exec command
find -name '*.bak' -exec rm {} \;
# Find only dirs
find -type d
# Find only files
find -type f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment