directories that change into symlinks

David Garamond davegaramond at icqmail.com
Wed Jan 8 14:39:00 EST 2003


Dave Dykstra wrote:
> Could you please post your full command line and say where in the directory
> structure the directories were replaced by symlinks?  I have not yet been
> able to come up with an example where --force makes a difference when
> using --delete and -r (or -a).  Refer to
>     http://lists.samba.org/pipermail/rsync/2002-January/005971.html

this is the 'old' directory (the one that will become a mirror of the 
'new' dir). note that dir3 is still a directory and dir3 is not empty:
===
[dave at builder old]$ ls -laR
..:
total 0
drwxrwxr-x    4 dave   dave        120 Jan  5 07:12 .
drwxrwxr-x    5 dave   dave        120 Jan  5 07:13 ..
lrwxrwxrwx    1 dave   dave          4 Jan  5 07:12 dir1 -> dir2
drwxrwxr-x    4 dave   dave         96 Jan  5 07:11 dir2
drwxrwxr-x    2 dave   dave         72 Jan  5 07:12 dir3

../dir2:
total 0
drwxrwxr-x    4 dave   dave         96 Jan  5 07:11 .
drwxrwxr-x    4 dave   dave        120 Jan  5 07:12 ..
drwxrwxr-x    2 dave   dave         72 Jan  5 07:11 dir11
drwxrwxr-x    2 dave   dave         72 Jan  5 07:11 dir12

../dir2/dir11:
total 0
drwxrwxr-x    2 dave   dave         72 Jan  5 07:11 .
drwxrwxr-x    4 dave   dave         96 Jan  5 07:11 ..
-rw-rw-r--    1 dave   dave          0 Jan  5 07:11 file1

../dir2/dir12:
total 0
drwxrwxr-x    2 dave   dave         72 Jan  5 07:11 .
drwxrwxr-x    4 dave   dave         96 Jan  5 07:11 ..
-rw-rw-r--    1 dave   dave          0 Jan  5 07:11 file2

../dir3:
total 0
drwxrwxr-x    2 dave   dave         72 Jan  5 07:12 .
drwxrwxr-x    4 dave   dave        120 Jan  5 07:12 ..
-rw-rw-r--    1 dave   dave          0 Jan  5 07:12 file3
===

this is the 'new' directory (the one that will be mirrored by the 
'old'). note that 'dir3' is now a symlink instead of a dir.

===
[dave at builder new]$ ls -laR
..:
total 0
drwxrwxr-x    4 dave   dave        120 Jan  5 07:13 .
drwxrwxr-x    5 dave   dave        120 Jan  5 07:13 ..
drwxrwxr-x    4 dave   dave         96 Jan  5 07:11 dir1
drwxrwxr-x    2 dave   dave         48 Jan  5 07:11 dir2
lrwxrwxrwx    1 dave   dave          4 Jan  5 07:11 dir3 -> dir1

../dir1:
total 0
drwxrwxr-x    4 dave   dave         96 Jan  5 07:11 .
drwxrwxr-x    4 dave   dave        120 Jan  5 07:13 ..
drwxrwxr-x    2 dave   dave         72 Jan  5 07:11 dir11
drwxrwxr-x    2 dave   dave         72 Jan  5 07:11 dir12

../dir1/dir11:
total 0
drwxrwxr-x    2 dave   dave         72 Jan  5 07:11 .
drwxrwxr-x    4 dave   dave         96 Jan  5 07:11 ..
-rw-rw-r--    1 dave   dave          0 Jan  5 07:11 file1

../dir1/dir12:
total 0
drwxrwxr-x    2 dave   dave         72 Jan  5 07:11 .
drwxrwxr-x    4 dave   dave         96 Jan  5 07:11 ..
-rw-rw-r--    1 dave   dave          0 Jan  5 07:11 file2

../dir2:
total 0
drwxrwxr-x    2 dave   dave         48 Jan  5 07:11 .
drwxrwxr-x    4 dave   dave        120 Jan  5 07:13 ..
===

now compare these two commands. i find that the second one works.

$ rsync -avz new/* old/
$ rsync -avz --force new/* old/

-- 
dave




More information about the rsync mailing list