Quantcast
Channel: Linux find: How to exclude the ".snapshot" directory from find's results? - Server Fault
Browsing all 3 articles
Browse latest View live

Answer by Calle Dybedahl for Linux find: How to exclude the ".snapshot"...

find $filedir -name .snapshot -prune -o -name \*.gz -mmin +10 -print should do it.

View Article



Linux find: How to exclude the ".snapshot" directory from find's results?

I wrote a rsync script which uses find command to find all files which are older than 10 minutes and copies them to a remote server. The relevant part of the code is: print_log "------ Starting $0...

View Article

Answer by ShadSterling for Linux find: How to exclude the ".snapshot"...

Pruning the name .snapshot works, but I prefer to prune the path /.snapshot:find $filedir -path "/.snapshots" -prune -o -name \*.gz -mmin +10 -print >> $varfile

View Article
Browsing all 3 articles
Browse latest View live




Latest Images