[K12OSN] Massive Rsyncing

MrGoblin goblin at scooter.co.nz
Thu Apr 1 23:24:57 UTC 2004


Henry Hartley wrote:

>>>Does anyone have a script that can find all of the .mozilla
>>>Cache folders and rm -rf  them from /home?
> 
> 
> How about something like this:
> 
> WARNING, this has not been tested.  I accept no responsibility if it deletes
> all files on your drive.
> 
> find / -regex .*\.mozilla.*Cache.* -exec rm '-fR' '{}' ';'
> 

Wouldn't adding '--exclude ".mozilla/"' to your rsync commandline be a 
much nicer way of handling this ?

rsync also accepts '--exclude-from=exclude.list' where "exclude.list" is 
a list of files and or directories to be excluded.

man rsync and look for the "EXCLUDE PATTERNS" section

mRgOBLIN





More information about the K12OSN mailing list