Finding specific files/directories from a remote rsync server.

Wayne Davison wayned at samba.org
Sun Apr 12 10:44:56 MDT 2015


On Fri, Apr 10, 2015 at 4:11 PM, Hongyi Zhao <hongyi.zhao at gmail.com> wrote:

> Say, if I want to find all of the `foo/file' on this rsync server
>

You'd use filter (include/exclude) rules.  See in the man page about its
notes on how rsync requires you to include all directories in order to
traverse the tree and you'd end up with something like this:

rsync -aiv --include=foo/file --include='*/' --exclude='*'
rsync.example.net::module/ /dest/

You might also try using --prune-empty-dirs.

..wayne..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20150412/df2c7cfa/attachment.html>


More information about the rsync mailing list