<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap:break-word;line-break:after-white-space"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;margin:0px;line-height:auto"><br></div><p class="airmail_on">On November 13, 2018 at 12:33:27, Roberto C. Sánchez (<a href="mailto:roberto@connexer.com">roberto@connexer.com</a>) wrote:</p> <div><blockquote type="cite" class="clean_bq" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><span><div><div></div><div>You need to pass the &#39;-s&#39; option to ls:<br><br>-s, --size<br>print the allocated size of each file, in blocks</div></div></span></blockquote></div><div id="bloop_customfont" style="margin:0px"><br></div><div id="bloop_customfont" style="margin:0px">Thanks for the helpful replies, everyone. I started re-working the problem, looking at it from the perspective of dealing with the size *before* using dd - shrinking the filesystem using resize2fs, and then shrinking the partition to match, rather than trying to shrink the entire card image as a single unit. After that, then I can take an image of the shrunk SD card.</div><div id="bloop_customfont" style="margin:0px"><br></div><div id="bloop_customfont" style="margin:0px">Researching the approach, I came across a super easy been-there-done-that shell script which can take the image and shrink it appropriately for the Pi:</div><div id="bloop_customfont" style="margin:0px"><br></div><div id="bloop_customfont" style="margin:0px"><span class="Apple-tab-span" style="white-space:pre">        </span><a href="https://github.com/Drewsif/PiShrink/blob/master/pishrink.sh">https://github.com/Drewsif/PiShrink/blob/master/pishrink.sh</a><br></div><div id="bloop_sign_1542137001127542016" class="bloop_sign"><br></div><div id="bloop_sign_1542137001127542016" class="bloop_sign">Bonus, this also sets up the pi to automatically expand to fill the card, which I was also going to have to figure out how to do. He does some interesting things in the script, especially at the end using parted and truncate.</div></body></html>