Exclude all hidden directories in UNIX find
Posted
by
xRickerlx
on Super User
See other posts from Super User
or by xRickerlx
Published on 2012-06-27T20:52:38Z
Indexed on
2012/06/27
21:20 UTC
Read the original article
Hit count: 155
I'm doing a word search using the following command:
find . -exec grep -q [some_word] '{}' \; -print -o -name .svn -prune -o -name .ssh -prune -o -name .boneyard -o -name log -prune -prune -o -name tmp -prune
Is it possible to use a regex to exclude all hidden directories?
Note: The current command traverses the entire tree from the current location and exclude those being pruned. The exclusion needs to work for any hidden directory regardless off location.
© Super User or respective owner