Last active
January 1, 2024 10:40
-
-
Save vadimkantorov/b1ec5127235f2bb3603a8429f6b9b257 to your computer and use it in GitHub Desktop.
Various find tricks
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
# cat all files not in .git directory | |
find -not -iwholename '*.git*' -type f -exec cat {} + | |
# cat all tsx files not in .git directory with file name section header | |
find -not -iwholename '*.git*' -type f -name '*.tsx' -exec tail --lines=+1 {} + | |
# unpack several downloaded tar files and then delete the original archives | |
find -name '*.tar.gz' -type f -exec tar -xf {} \; -delete | |
# search recursively in all CMakeLists.txt files a substring 1.78 | |
find . -name CMakeLists.txt -exec grep -H '1.78' {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment