<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I am not sure to know which flag did the trick, but indeed now my Application Folder is 22 Gb like in the internal drive.<div class="">Thanks a lot</div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">Le 26 oct. 2017 à 14:19, Jim Jagielski <<a href="mailto:jimjag@gmail.com" class="">jimjag@gmail.com</a>> a écrit :</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">When using rsync on HFS+, I tend to always use the following options:<div class=""><br class=""></div><div class="">    rsync --archive --crtimes --hard-links --acls --xattrs --fileflags --force-change --protect-decmpfs</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Thu, Oct 26, 2017 at 6:22 AM, Ryan Schmidt <span dir="ltr" class=""><<a href="mailto:ryandesign@macports.org" target="_blank" class="">ryandesign@macports.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br class="">
On Oct 26, 2017, at 04:28, pagani laurent wrote:<br class="">
<br class="">
>> My first guess would be that some items on your internal drive are hardlinked, and that when you rsync, those items are being created on the external drive as separate files with each copy taking up space. And I can confirm by inspection that there are many hardlinked items inside the Xcode 9 app, for example. There's a flag you can supply to rsync ("--hard-links") to tell it to detect and recreate hard links on the destination drive, which should eliminate this reason for the size difference.<br class="">
><br class="">
> Did not work. I erased Xcode again and rsync’ed it with —hard-links. Size remains the same. 12 Gb instead of 7.8 local.<br class="">
<br class="">
</span>I can only confirm your observation. My original Xcode.app is "10,581,631,771 bytes (5.76 GB on disk)" according to the Finder's Get Info window, while an rsync'd copy with --hard-links is "10,511,782,504 bytes (11.12 GB on disk)". As a result, I now question whether it's possible to create an accurate copy of a macOS disk using rsync.<br class="">
<br class="">
The rsync manpage mentions --hard-links not being a default because finding hard links is expensive. Maybe there is an upper limit to the number or size of files rsync is willing to analyze to find hard links; if so, maybe what we're doing exceeds that limit.<br class="">
<br class="">
Maybe Xcode and other things on your original disk are making use of directory hard links, a feature Apple implemented so that Time Machine could be more efficient, but which rsync doesn't know about. I read about this here:<br class="">
<br class="">
<a href="https://arstechnica.com/civis/viewtopic.php?f=20&t=1108222" rel="noreferrer" target="_blank" class="">https://arstechnica.com/civis/<wbr class="">viewtopic.php?f=20&t=1108222</a><br class="">
<br class="">
It's also mentioned there that you can use "cpio -pdl" somehow to reunite inadvertently duplicated files with one another as hard links, though I'm not sure what it will do if you have any identical files that are supposed to remain unlinked.<br class="">
<br class="">
<br class="">
</blockquote></div><br class=""></div>
</div></blockquote></div><br class=""><div class="">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Palatino; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;  "><div class="">"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème" (devise Shadok)</div></span>
</div>
<br class=""></div></body></html>