Question about rsync -uav dir1/. dir2/.: possib to link?
drsalists at gmail.com
Sun Sep 5 00:34:27 UTC 2021
I was thinking --link-dest too.
Sometimes this can be done with cpio too; check out the -pdlv options.
On Sat, Sep 4, 2021 at 4:57 PM Kevin Korb via rsync <rsync at lists.samba.org>
> Rsync does almost everything cp does but since it is designed to network
> it never got that feature. I was thinking maybe --link-dest could be
> tortured into doing it but if it can I can't figure out how. BTW, you
> have some pointless dots in there.
> On 9/4/21 6:41 PM, L A Walsh via rsync wrote:
> > I noticed in looking at download dirs for a project, that
> > another mirror had "crept-in" for usage (where different mirrors
> > are stored under mirror-URL names). To copy over the diffs,
> > normally I'd do:
> > rsync -uav dir1/. dir2/.
> > (where dir1="the new mirror that I'd switched
> > to by accident, and dir2=the original dir).
> > The files were "smallish" so I just copied them, BUT I wass
> > wondering if there was an option similar to using 'cp' for
> > a dircopy, but instead of
> > cp -a dr1 dr2
> > using:
> > cp -al dr1 dr2
> > to just hard-link over files from "dir1" to "dir2" (both
> > are on the same file system).
> > I looked at (and tried) --link-dest=DIR
> > (hardlink to files in DIR when unchanged), but either I had the syntax
> > wrong, or didn't understand it as it didn't seem to do what I
> > wanted: cp'ing the new files in dir1 into the orig dir).
> > Does rsync have an option to just "copy" over the new
> > files via a hardlink?
> > Tnx!
> Kevin Korb Phone: (407) 252-6853
> Systems Administrator Internet:
> FutureQuest, Inc. Kevin at FutureQuest.net (work)
> Orlando, Florida kmk at sanitarium.net (personal)
> Web page: https://sanitarium.net/
> PGP public key available on web site.
> Please use reply-all for most replies to avoid omitting the mailing list.
> To unsubscribe or change options:
> Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rsync