[Bug 13615] New: Output of --list-only not as I expected re: symlinks

samba-bugs at samba.org samba-bugs at samba.org
Thu Sep 13 17:55:50 UTC 2018


            Bug ID: 13615
           Summary: Output of --list-only not as I expected re: symlinks
           Product: rsync
           Version: 3.1.3
          Hardware: x64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: core
          Assignee: wayned at samba.org
          Reporter: michael at redmule.com
        QA Contact: rsync-qa at samba.org

The output of --list-only isn't as I expected as regards symlinks. Here are my
test files:

$ ls ./src
-rw-------  1 michael michael    0 2018-09-05 09:18:15 file
lrwxrwxrwx  1 michael michael    4 2018-09-05 09:18:28 near_symlink -> file
-rw-------  1 michael michael    0 2018-09-13 12:39:41 exclude
lrwxrwxrwx  1 michael michael    4 2018-09-13 12:40:47 far_symlink -> /etc

I want to know which files are candidates to transfer. I don't want symlinks to
transfer. I run it with --list-only :

$ rsync -r --no-links --list-only --exclude="/excl*" ./src/
drwx------          4,096 2018/09/13 12:40:47 .
lrwxrwxrwx              4 2018/09/13 12:40:47 far_symlink
-rw-------              0 2018/09/05 09:18:15 file
lrwxrwxrwx              4 2018/09/05 09:18:28 near_symlink

This seems to indicate the symlinks are expected to transfer. Note that
--list-only correctly handles exclusions.

But when I actually run the transfer, the symlinks are not transferred:

$ rsync -r --no-links --exclude="/excl*" ./src/ ./dest
skipping non-regular file "far_symlink"
skipping non-regular file "near_symlink"

$ ls ./dest
-rw-------  1 michael michael    0 2018-09-13 12:49:06 file

So it seems like --list-only is not being truthful as regards symlinks. Or else
I misunderstand the purpose of --list-only.

So I am submitting a request to either:
 a) correct the output of --list-only, or
 b) have the purpose and intended use case of --list-only be better explained
in the docs.

You are receiving this mail because:
You are the QA Contact for the bug.

More information about the rsync mailing list