How do I make find exclude hidden files (.files)
The find command will find all files including those that start with ".". For example if you have a dir with .htaccess in it
find . -type f will include the .htaccess in the results. Can I exclude those files? (I guess I could pipe it to grep and somehow do an exclusion maybe?) (Also how would I do this with tar? The man page for tar says "PATTERN" but doesn't specify what "PATTERN" is. Regex? ) |
You may use the -regex option, like this
Code:
find . \( ! -regex '.*/\..*' \) -type f |
Using the negation modifier
You can also use:
Code:
find . -type f -not -name ".*" |
All times are GMT -5. The time now is 04:07 AM. |