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