--list-only ordering
Paul Slootman
paul+rsync at wurtel.net
Mon Dec 17 10:09:42 MST 2012
On Mon 17 Dec 2012, Chris Dennis wrote:
>
> I've noticed an apparent inconsistency in the ordering of output
> from the --list-only option.
>
> For example:
> $ ls
> d1 d2 d2-x d3 f1 f2 f2-x f3
> $ rsync --list-only .
> drwxr-xr-x 4096 2012/12/17 15:18:05 .
> -rw-r--r-- 0 2012/12/17 15:17:52 f1
> -rw-r--r-- 0 2012/12/17 15:17:52 f2
> -rw-r--r-- 0 2012/12/17 15:17:52 f2-x
> -rw-r--r-- 0 2012/12/17 15:17:52 f3
> drwxr-xr-x 4096 2012/12/17 15:17:40 d1
> drwxr-xr-x 4096 2012/12/17 15:17:40 d2-x
> drwxr-xr-x 4096 2012/12/17 15:17:40 d2
> drwxr-xr-x 4096 2012/12/17 15:17:40 d3
>
> Note that the files are listed in a 'sensible' order, with f2-x
> coming after f2. But for the directories, d2-x comes before d2.
I wouldn't be surprised if rsync appends a slash to the directory names
internally; '-' sorts before '/' in ASCII.
Paul
More information about the rsync
mailing list