use absolute paths in transfer list

Wayne Davison wayne at opencoder.net
Fri Feb 18 02:07:49 UTC 2022


On Wed, Feb 16, 2022 at 2:57 AM Fourhundred Thecat via rsync <
rsync at lists.samba.org> wrote:

> how can I print the full paths?
>

If you're pushing files (which includes a local copy), putting "%f" into
--out-format gets you the full specified path for the source files.  It
likes to strip the leading slash, so I'll toss that into the format and
assume you'll always use absolute paths:

rsync -a --del --out-format='/%f%L' /path/one/ /path/two/ /dest/path/

If you're pulling files, you could switch to a daemon-over-ssh setup
(creating a remote ~/rsyncd.conf file with a single module in it) and
specify a log directive with %f in it.  I believe that gets you a log file
of the full path names, but not any extra path info in the output.

Of course, if you have a single source, you could fudge the info:

rsync -a --del --out-format='/one/path/%n%L' host:/one/path/ /dest/path/

..wayne..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20220217/45ceb2a7/attachment.htm>


More information about the rsync mailing list