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 > Mac OS X > Not reporting right file sizes?

Not reporting right file sizes?
Thread Tools
Grizzled Veteran
Join Date: May 2000
Location: ON, Canada
Status: Offline
Reply With Quote
Dec 31, 2003, 12:11 PM
 
I've been batch converting .tiff files to make them .gifs using Photoshop Elements and the resulting gifs are reported by Finder as being 64K files. Yet, if I open one in preview.app and do a get info, it says 5k.

Also, if I do file listing of the folder where these gifs images are within the ftp software Transmit, it reports the files as being 5k each as well.

A bash term using 'ls -al' also reports the files are 5k.

So what's wrong with the Finder ? Why isn't it reporting the right file sizes?

(OS X 10.3.2, iBook G4 933Mhz)
Macbook (white glossy) 2.16GHz | 4GB RAM | 7200RPM HD | 10.5.x
     
Professional Poster
Join Date: Jun 2000
Status: Offline
Reply With Quote
Dec 31, 2003, 12:17 PM
 
Sounds like you're using the HFS and not HFS+. I thought X would only run on HFS+. Not sure about this.

Anyway, what this means is the file is only 5 KB in size, but the disk is partitioned into 64 KB chunks. Meaning you can use any combination of these 64 KB chunks to hold your data. If your file was 128 KB in size, it would fit perfectly into two chunks. One of benefits of using the HFS+ file system is that is uses 4 KB chunks. So your 5 KB file would only consume 2 of these chunks. Doesn't sound very useless, but if you imagine having millions of these small files, you'll save quite a bit of space.
     
Grizzled Veteran
Join Date: May 2000
Location: ON, Canada
Status: Offline
Reply With Quote
Dec 31, 2003, 12:21 PM
 
I mentioned above that I was using 10.2.3. The hard disk is factory formatted by Apple and disk utility says its 'mac os extended'. Is that not hfs+?

Oh wait, an 'info' on the drive partition from drive utility says, 'Apple_HFS'. Does that mean it's not +'ed?
Macbook (white glossy) 2.16GHz | 4GB RAM | 7200RPM HD | 10.5.x
     
Dedicated MacNNer
Join Date: Jun 2001
Location: The Land of More :(
Status: Offline
Reply With Quote
Dec 31, 2003, 12:36 PM
 
You are right, Mac OS Extended is HFS+.

The files may have resource forks for icon previews (which Photoshop includes by default), Preview and Transmit may only be reporting the data fork size and ignoring the resource fork. I can understand why Transmit would ignore it because you can't FTP resource forks. If Preview is ignoring them too, then that is just silly.

"And I will rule you all with an iron fist! You! OBEY THE FIST!" -Invader Zim
     
Grizzled Veteran
Join Date: May 2000
Location: ON, Canada
Status: Offline
Reply With Quote
Dec 31, 2003, 12:39 PM
 
Oh right, the ol resource forks. Elements is a carbon app so I suppose it would HAVE to remain 9/resource friendly.
Macbook (white glossy) 2.16GHz | 4GB RAM | 7200RPM HD | 10.5.x
     
Professional Poster
Join Date: Jun 2000
Status: Offline
Reply With Quote
Dec 31, 2003, 12:39 PM
 
Originally posted by darcybaston:
I mentioned above that I was using 10.2.3. The hard disk is factory formatted by Apple and disk utility says its 'mac os extended'. Is that not hfs+?

Oh wait, an 'info' on the drive partition from drive utility says, 'Apple_HFS'. Does that mean it's not +'ed?
Yup, you're using HFS+, also called Mac OS Extended.

I did a little test on my own. I've got a JPG, while the Finder reports as using 236 KB of disk space, and 234,607 bytes of actual space (230 KB approx.) Doing an info in Preview reports the size as 172 KB.
     
Mac Elite
Join Date: Feb 2001
Location: Washington, DC
Status: Offline
Reply With Quote
Dec 31, 2003, 12:49 PM
 
If the hard disk came from apple with os x on it, it should be HFS+.

What's probably happening is the Finder is including the resource fork's size in the total file size. Photoshop, for example, places a preview of the image file in the resource fork.

Both preview.app and transmit would only give you the size of the data fork, since that's all they're really concerned with, and the unix tools don't really understand what a resource fork is and only work with the data forks. For example, if you copy a file using cp in terminal, the copied file will have no resource fork.

I think that's what's going on here. Try copying the files in terminal to someplace else and see if the reported file size goes down.
/Earth\ Mk\.\ I{2}/
     
Grizzled Veteran
Join Date: May 2000
Location: ON, Canada
Status: Offline
Reply With Quote
Dec 31, 2003, 12:52 PM
 
Try copying the files in terminal to someplace else and see if the reported file size goes down.
BINGO! That cleared it up and I now understand fully. Thanks mate!
Macbook (white glossy) 2.16GHz | 4GB RAM | 7200RPM HD | 10.5.x
     
   
Thread Tools
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 10:43 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2