Re: rsync

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



At 02:09 PM 3/7/2008, you wrote:

On Friday 07 March 2008 18:40:03 Craig White wrote:
> I've gone over and over the man page and I don't get it and it's
> obviously a simple task
>
> I want to rsync a directory but only the pdf files...
>
> rsync -ncauv --include=*.pdf $WORKING $WEB_SERVER
> # sync's everything, I want to exclude stuff
>
> rsync -ncauv --filter='+ *.pdf' --filter='+ *.odt *.ott *.eps' \
> $WORKING $WEB_SERVER
> # sync's everything...does not seem to exclude anything
>
> rsync -ncauv --filter='. /root/scripts/qm_manual_filter' \
> $WORKING $WEB_SERVER
> # cat qm_manual_filter
> - *
> + *pdf
>
> excludes everything
>
> I am using -n for dry-run
> I definitely need recursive but -a option handles that
>
I don't know if it would work, but could you
use --exclude-from=/path/to/skiplist.txt to exclude everything then use your
filter line to add .pdfs back?

I've not tried adding anything back after excluding.  You can certainly use
wild cards in your skiplist, such as *.odt *.ott *.eps

Anne

I think Anne has got the solution here: --exclude-from= switch. I've been using rsync for years and never could get the --exclude= switch to work, but --exclude-from= works a charm. That said, I've always had problems with tar -exclude switches too, so take my advice with a grain o' salt.

Cheers!

--
No virus found in this outgoing message.
Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.21.6/1316 - Release Date: 3/6/2008 6:58 PM


_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux