Finding specific files/directories from a remote rsync server.

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

On Fri, Apr 10, 2015 at 4:11 PM, Hongyi Zhao <hongyi.zhao at> 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='*' /dest/

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the rsync mailing list