rsync specified directory(ies)

Kevin Korb kmk at
Tue Jun 17 10:45:47 MDT 2014

Hash: SHA1

If you have only one instance of 01 then just use that as the source.
 But you probably have more than one so try:

rsync  -aviz --include='*/' --include='*/00' --include='*/00/**
- --exclude='*' --prune-empty-dirs . remote_host:/tmp

Or, since you aren't using --delete you could do:
rsync -aviz --relative ./*/00 remote_host:/tmp

On 06/17/2014 09:28 AM, Pletter Thomas wrote:
> Hello,
> i try to copy a specified directory and the according folders and
> files below to a remote host.
> cd /dir /usr/bin/rsync  -ravz -e ssh --include='*/'
> --include='*/00/*/*' --exclude='*' .  remote_host:/tmp
> i want to copy in these example the directory "00" and the
> according folders and files below. the structure of the directory
> is defined by a software and only directory "00" is variable.
> the structure of the directories are :
> 000001 000001/00 000001/00/dir1 000001/00/dir1/file1 
> 000001/00/dir1/file2 000001 000001/01 000001/01/dir1 
> 000001/01/dir1/file1 000001/01/dir1/file2
> is it possible with rsync ? i tried several options and gets no
> result
> kind regards
> ______________________________________
> HINWEIS: Alle von Gesellschaften der REWE International AG
> elektronisch uebermittelten Auskuenfte, Mitteilungen und
> Erklaerungen sind vertraulich und rechtlich unverbindlich.
> Verpflichtungen von Gesellschaften der REWE International AG
> beduerfen der schriftlichen Einigung in saemtlichen Vertragspunkten
> sowie der Unterfertigung durch das vertretungsbefugte Organ. Im
> Falle einer Fehluebermittlung ersuchen wir um Benachrichtigung
> sowie um Vernichtung und Beachtung, dass jegliche Form der
> Verwendung und Weitergabe der Inhalte an Dritte unzulaessig ist.
> NOTICE: All notices, declarations and explanations transferred
> electronically from REWE International AG companies are
> confidential and not legally binding. Obligations of  REWE
> International AG companies arise only when written agreement to all
> contractual points has been confirmed in writing with the signature
> of an authorized representative. If this e-mail was sent by
> mistake, please inform  us immediately. Furthermore we also request
> you to destroy it and use neither the contents nor disclose them in
> any manner to third parties.

- -- 
	Kevin Korb			Phone:    (407) 252-6853
	Systems Administrator		Internet:
	FutureQuest, Inc.		Kevin at  (work)
	Orlando, Florida		kmk at (personal)
	Web page:
	PGP public key available on web site.
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird -


More information about the rsync mailing list