Skip to content

Instantly share code, notes, and snippets.

@julian-garrido
Last active October 29, 2020 13:25
Show Gist options
  • Save julian-garrido/f5dfdd230b61f5f838e5 to your computer and use it in GitHub Desktop.
Save julian-garrido/f5dfdd230b61f5f838e5 to your computer and use it in GitHub Desktop.
Different use cases for find command
#find files that ends in .py with a tgz
tar -tzf tmp.tgz | grep $*.tgz$
#find files that ends in .py in all the tgz files that you may find
find ./ -name "*.tgz" -execdir sh -c 'tar -tzf {} | grep $*.py$' \;
#find files greater than X MB and show path and size
find . -type f -size +800M -exec ls -lh {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment