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.
Hi, Pletter Thomas <T.Pletter at rewe-group.at> (Di 17 Jun 2014 15:28:21 CEST):> 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 resultProbably I do not understand, but if I do, then rsync -a 00001/00 remote_host:/tmp/ is not that what you're looking for? -- Heiko -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 847 bytes Desc: Digital signature URL: <http://lists.samba.org/pipermail/rsync/attachments/20140617/85a45a79/attachment.pgp>
-----BEGIN PGP SIGNED MESSAGE----- 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 FutureQuest.net (work) Orlando, Florida kmk at sanitarium.net (personal) Web page: http://www.sanitarium.net/ PGP public key available on web site. ~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~ -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlOgcLsACgkQVKC1jlbQAQd0yACdHDc/2HEWxbGC/De40e2uglcK ET0AoLHSKnHtMeWixd78QNes5M0MJjtz =eRWp -----END PGP SIGNATURE-----
Apparently Analagous Threads
- Re: XCP which management console to use - plus XenServer question
- OpenSSH - SFTP issue
- Just a simple smbpasswd authentication won't work
- ext3 "noload" option to mount returning error in 2.4.9&2.4.18 ser ies kernel
- RE: ext3fs still uses sequential search of file names in director ies?