Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Differences in file size (Linux / OS X)

Differences in file size (Linux / OS X)
Thread Tools
all2ofme
Grizzled Veteran
Join Date: Mar 2001
Location: London, UK
Status: Offline
Reply With Quote
Nov 30, 2004, 07:21 PM
 
I've copied a few files from my Powerbook (10.3.6) across to a linux box I have (running Suse) and while most of the files are the same size when I check them now, some of them are slightly different. Only by a few bytes, but different.

I've tried copying those files again, and it works ok with individual files. I've also tried to copy the files back again to see if they change going the other way, but it would seem now. File sizes remain as they were.

Here's an example (same file)
Pbook: 6,500,470
Same file copied to linux: 6,500,470

Linux (copied along with a few others last week): 6,500,356
Same copied to Pbook: 6,500,356

I hope I'm making myself clear. Does anyone know why this might be the case?
     
jasong
Mac Elite
Join Date: Mar 2000
Location: Allston, MA, USA
Status: Offline
Reply With Quote
Nov 30, 2004, 08:03 PM
 
It's been a long day, but your numbers look the same to me . . .

Pbook: 6,500,470
Same file copied to linux: 6,500,470

Linux (copied along with a few others last week): 6,500,356
Same copied to Pbook: 6,500,356
-- Jason
     
all2ofme  (op)
Grizzled Veteran
Join Date: Mar 2001
Location: London, UK
Status: Offline
Reply With Quote
Nov 30, 2004, 08:21 PM
 
Long day for me too - I don't think I'm making myself as clear as I need to

The two files I've listed are one and the same (copied from the Powerbook to the linux box about a week ago). The difference of 114 bytes shown is what's bothering me. The reason I showed the info you quoted was to show that it doesn't always happen, as the same file copied back and forth between the machines now appears not to change anything.

However, somewhere along the line there's something awry. Would love to know what, as I want to backup all these files.
     
larkost
Mac Elite
Join Date: Oct 1999
Location: San Jose, Ca
Status: Offline
Reply With Quote
Nov 30, 2004, 08:35 PM
 
Are they text files? can you diff them?
     
wataru
Addicted to MacNN
Join Date: Oct 2001
Location: Yokohama, Japan
Status: Offline
Reply With Quote
Dec 1, 2004, 12:33 AM
 
Could it be a filesystem thing?
     
Laurence
Mac Enthusiast
Join Date: Mar 1999
Location: Portland, Oregon, United States
Status: Offline
Reply With Quote
Dec 1, 2004, 01:04 AM
 
If the files contain resource forks then those will be stripped when copying to Linux, Windows, UFS, etc. Basically anything other than HFS or HFS+

For some files (w/o resource forks) there would be no size difference, but other files could be off by any amount up to the size of the file. (in the case of a file with no data fork)
--Laurence
     
Xeo
Moderator Emeritus
Join Date: Mar 2001
Location: Austin, MN, USA
Status: Offline
Reply With Quote
Dec 1, 2004, 01:22 AM
 
use md5 on them to see if the hashes are the same
     
all2ofme  (op)
Grizzled Veteran
Join Date: Mar 2001
Location: London, UK
Status: Offline
Reply With Quote
Dec 1, 2004, 09:01 AM
 
Thanks for the replies, everyone.

Tried an MD5 hash (which was different - should have been, I guess, different file sizes and all).

Tried moving it around between other FS to see if that was anything to do with it, no joy.

Ended up bringing it up in TextEdit and finding that this was near the start of the bigger file:

Edit: See screenshot instead http://81.6.236.94/~ben/difference.gif
( Last edited by all2ofme; Dec 1, 2004 at 10:57 AM. )
     
Xeo
Moderator Emeritus
Join Date: Mar 2001
Location: Austin, MN, USA
Status: Offline
Reply With Quote
Dec 1, 2004, 10:14 AM
 
Originally posted by all2ofme:
Thanks for the replies, everyone.

Tried an MD5 hash (which was different - should have been, I guess, different file sizes and all).

Tried moving it around between other FS to see if that was anything to do with it, no joy.

Ended up bringing it up in TextEdit and finding that this was near the start of the bigger file:

EP
Well that's only 2 bytes difference. So there's more different than that.
     
all2ofme  (op)
Grizzled Veteran
Join Date: Mar 2001
Location: London, UK
Status: Offline
Reply With Quote
Dec 1, 2004, 10:56 AM
 
You're right, of course. For some reason not all of what I pasted in has displayed. Here's a screenshot showing both in TextEdit.

http://81.6.236.94/~ben/difference.gif
     
tooki
Admin Emeritus
Join Date: Oct 1999
Location: Zurich, Switzerland
Status: Offline
Reply With Quote
Dec 1, 2004, 11:17 AM
 
The differences there are in the ID3 tags. The filesystem will never alter the contents of a file: these differences weren't caused by the move to/from Linux. These differences are in the ID3 tags (where things like song title, genre, etc are stored). Presumably the Linux MP3 player decided to add more tags.

tooki
     
all2ofme  (op)
Grizzled Veteran
Join Date: Mar 2001
Location: London, UK
Status: Offline
Reply With Quote
Dec 1, 2004, 12:08 PM
 
Interesting. I thought that ID3 tags were still stored at the end of files, but right you are. Actually it was iTunes adding data, so my best guess so far is that it was adding the more unusual tag info such as play count and ratings.

Originally posted by tooki:
The differences there are in the ID3 tags. The filesystem will never alter the contents of a file: these differences weren't caused by the move to/from Linux. These differences are in the ID3 tags (where things like song title, genre, etc are stored). Presumably the Linux MP3 player decided to add more tags.

tooki
     
The Godfather
Addicted to MacNN
Join Date: Dec 1999
Location: Tampa, Florida
Status: Offline
Reply With Quote
Dec 2, 2004, 12:44 AM
 
Maybe if you make the file a read-only the file size will not change.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 02:47 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,