[Klug-general] USB & rsync +file exclude?

sharon kimble boudiccas at talktalk.net
Thu Sep 29 18:24:55 UTC 2011


On Thursday 29 September 2011 18:22:26 Mike Evans wrote:
> On 29/09/11 18:01, sharon kimble wrote:
> > How do I exclude /home/boztu/music please?
> 
> rsync has --exclude=PATTERN and --exclude-from=FILE options seen man rsync
> 
> Mike

Thanks Mike, it now shows ;= 
if [ -d /media/usb/ ]; then
   /usr/bin/rsync -av --exclude *.mp2 /home/boztu/ /media/usb/`/bin/date 
+%Y%m%d`/ \
   >> /home/boztu/cron/backup.txt
fi

This shows the discs titles, etc but totally excludes each track. It never 
occurred to me to have a look at the man page, thanks for pointing me in the 
right direction. Its now working nicely :)

Sharon.
-- 
A taste of linux = http://www.sharons.org.uk/taste/index.html
efever = http://www.efever.blogspot.com/
efever = http://sharon04.livejournal.com/
Debian 6,0.2, KDE 4.4.5, LibreOffice 3.4.3
Registered Linux user 334501 



More information about the Kent mailing list