[PLUG] Different file sizes on different computers

King Beowulf kingbeowulf at gmail.com
Fri Dec 13 02:10:49 UTC 2013


On 12/09/2013 09:32 PM, John Jason Jordan wrote:
> I have been configuring my new System76 Bonobo Extreme computer. In the
> process I have moved all the distro ISOs that I keep for the Clinic. To
> be sure that I have all of them properly moved to the new computer I
> right clicked on each folder to check its properties, which tells me
> how many files and the total size of the folder. For some reason the
> files appear to have grown during the move:
> 
> 			Old		New
> Debian		10.9GB	11.7GB
> DSL		49.9MB	52.3MB
> Fedora		15.7GB	16.8GB
> Knoppix		701MB	735MB
> Mint			9.2GB	9.9GB
> Puppy		156MB	163.7MB
> Ubuntu		52.2GB	56.0GB
> 
> I find this very strange. Does anyone have any idea why this should be?
> _______________________________________________

I forgot to mention "du" in a prior response; given the subsequent
"kerfuffle" on this list.  For example:

$ du --si earth_night_rotate_1080.h264.mov
58M	earth_night_rotate_1080.h264.mov

$ du -h earth_night_rotate_1080.h264.mov
55M	earth_night_rotate_1080.h264.mov

"du --si" reports human readable format in multiples of 1000
"du -h" reports human readable format in multiples of 1024

As for md5sum, there is nothing wrong with using it for file transfer or
download verification for your situation. Most linux distros and
repositories still use it. Either grab the one from your d/l site or
generate your own.  Sure, you could suffer a man-in-the-middle attack
while downloading from some .ch or .ru, etc site, that could serve up a
corrupted payload with the same md5 hash, but then that's your fault.
The security paranoid will say to use sha256sum, and that's fine too.

Calculation if hash on SlackwareDVD 2.3GB
md5sum = 22.733s
sha256sum = 24.058s

...or use rsync to transfer files and forget about it.

Hard drive manufactures have been marketing drives in multiples of 1000
instead of 1024 for years: Bah, I say!  Some software tools do the same
to enhance user experience.

To get stats on your drives (sectors, blocks, etc):

1. Look in (X == your drive):
 /sys/block/sdX/queue

2. fdisk -l /dev/sdX

3. hdparm -I /dev/sdX

and of course, tune2fs, as mention on another post.

IIRC, you have your low level format (no one worries about that these
days) and your filesystem format. HD latters have many racks, tracks
have many sectors, sectors are 512 bytes or larger, blocks are groups of
one or more sectors, clusters are...clusters of blocks...  How much used
space is reported depends on the drive dimensions, bytes per sector,
file format defaults...  These days, with multi-hundred gigabyte and
terabyte drives, no one gives a rats rump about optimizing drive format
for the type data stored (many small files or large files); modern file
systems do a fair job of that for you.

Have Fun,
-Ed




More information about the PLUG mailing list