Last active
May 17, 2017 08:01
-
-
Save dcorking/f7955a8a74b8ad4606f9 to your computer and use it in GitHub Desktop.
Notes on findutils
This file contains hidden or 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
# This is not the official way to prune directories, but I found it easier. | |
# It prints the contents of all the files in the tree - excluding .git and CachedPixmaps, | |
# but there is a potential bug in the second globbed file name | |
# | |
# Works with GNU findutils. Might not work with BSD find, such as Mac OS X. | |
find -not -wholename './.git*' -not -wholename '*CachedPixmaps*' -type f |xargs cat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It turns out my approach is supported by a Stack Overflow answer that has more votes than the accepted answer http://stackoverflow.com/questions/4210042/exclude-directory-from-find-command/15736463#15736463 (-wholename is a newer synonym for -path)
find . -not -wholename './.git*'