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.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,