Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Find symlinks, or what should be symlinks...



Thanks Kalin, Jens, Travis, for the replies.

> `rsync -HavPS --delete FROM:dewdwe/ TO:/dwedwe/`

I tried this (experimenting with just one sub-directory tree), and it
didn't work - it copied over all files again, but also left behind the
original file, rather than creating a symlink (even though it said it
was copying a symlink on the source side!)

I then decided to just do the copy again, fresh, using this:
  rsync -avz --safe-links  SRC DEST

Well, I just learnt something very important about rsync, as some
symlinks within the directory tree got copied, some didn't (*). Poking
around, the ones that worked were relative (../../path/to/elsewhere),
while the ones that didn't get copied used an absolute path in the
symlink (/home/darren/path/to/elsewhere).

(For the above-mentioned test I was using a directory that used absolute
paths, so it might have done the Right Thing with relative paths.)

Darren

*: It is telling me the symlinks that fail, so I think I can come back
and get a list afterwards, and will fix them by hand. With a relative path!!


-- 
Darren Cook, Software Researcher/Developer
My new book: Data Push Apps with HTML5 SSE
Published by O'Reilly: (ask me for a discount code!)
  http://shop.oreilly.com/product/0636920030928.do
Also on Amazon and at all good booksellers!


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links