![]() |
'find' command regex to exclude hidden files?
I have the following command which finds all files that have changed in the last day and lists them. How can I exclude hidden files like .bash_history?
Code:
find /home/jon -type f -mtime -1 -print Thanks. |
Hi,
If you are only interested in removing the dot-files and not the dot-directories: find /home/jon -not -name "\.*" -type f -mtime -1 -print If all dot-directories need to be excluded as well: find /home/jon -type f -mtime -1 -print | grep -v "/\." Hope this helps. |
Thanks very much! I didn't know you could use something like -not...good to know :)
|
You're welcome :)
|
All times are GMT -5. The time now is 10:01 AM. |