Last active
October 29, 2020 13:25
-
-
Save julian-garrido/f5dfdd230b61f5f838e5 to your computer and use it in GitHub Desktop.
Different use cases for find command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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