Re: List subdirectories only n level deep on the remote server when use the -a option of rsync.
On Sun 02 Feb 2014, Hongyi Zhao wrote: But I've tried the following methodes based on your suggestion and get different results: werner@debian:~$ rsync -a --exclude '/*/*/*/*' rsync://ftp.cn.debian.org/debian | wc -l 1798 werner@debian:~$ rsync -a --exclude '/*/*/*/**' rsync://ftp.cn.debian.org/debian | wc -l 1798 werner@debian:~$ rsync -a --exclude '/*/*/*/***' rsync://ftp.cn.debian.org/debian | wc -l 1631 As you can see, the first two give same results, but the third, i.e., the one you gives, give a different result. Why does this happen? From the manpage: * a trailing dir_name/*** will match both the directory (as if dir_name/ had been specified) and everything in the directory (as if dir_name/** had been specified). This behavior was added in version 2.6.7. Paul -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
List subdirectories only n level deep on the remote server when use the -a option of rsync.
Hi all, I want to list the contents on the remote rsync server only to n, say, 2 level deep. In my case the the server is rsync://ftp.cn.debian.org, and I want to list all of the stuff in the following subdirectory only to 2 level deep: rsync://ftp.cn.debian.org/debian Any hints on this? Regards -- Hongyi Zhao hongyi.z...@gmail.com Xinjiang Technical Institute of Physics and Chemistry Chinese Academy of Sciences GnuPG DSA: 0xD108493 -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: List subdirectories only n level deep on the remote server when use the -a option of rsync.
On Sun 02 Feb 2014, Hongyi Zhao wrote: I want to list the contents on the remote rsync server only to n, say, 2 level deep. In my case the the server is rsync://ftp.cn.debian.org, and I want to list all of the stuff in the following subdirectory only to 2 level deep: rsync://ftp.cn.debian.org/debian Any hints on this? rsync -a --exclude '/*/*/*/***' rsync://ftp.cn.debian.org/debian Paul -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: List subdirectories only n level deep on the remote server when use the -a option of rsync.
Thanks a lot, Paul. But I've tried the following methodes based on your suggestion and get different results: werner@debian:~$ rsync -a --exclude '/*/*/*/*' rsync://ftp.cn.debian.org/debian | wc -l 1798 werner@debian:~$ rsync -a --exclude '/*/*/*/**' rsync://ftp.cn.debian.org/debian | wc -l 1798 werner@debian:~$ rsync -a --exclude '/*/*/*/***' rsync://ftp.cn.debian.org/debian | wc -l 1631 As you can see, the first two give same results, but the third, i.e., the one you gives, give a different result. Why does this happen? Regards 2014-02-02, Paul Slootman paul+rs...@wurtel.net: On Sun 02 Feb 2014, Hongyi Zhao wrote: I want to list the contents on the remote rsync server only to n, say, 2 level deep. In my case the the server is rsync://ftp.cn.debian.org, and I want to list all of the stuff in the following subdirectory only to 2 level deep: rsync://ftp.cn.debian.org/debian Any hints on this? rsync -a --exclude '/*/*/*/***' rsync://ftp.cn.debian.org/debian Paul -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html -- Hongyi Zhao hongyi.z...@gmail.com Xinjiang Technical Institute of Physics and Chemistry Chinese Academy of Sciences GnuPG DSA: 0xD108493 -- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html