On Apr 14, 2012, at 4:40 AM, Shane Stanley wrote:

> On 14/04/2012, at 6:23 PM, Ken Thomases wrote:
> 
>> The Finder-created one probably has a resource fork with additional data.  
>> That accounts for the size difference that isn't visible using "ls".  
>> Off-hand, I don't know what the resource fork data holds.
> 
> How do I see the resource forks, if not with ls?

You can see the names and sizes of extended attributes, of which the resource 
fork is one, using "ls -@".  You can read the extended attribute using "xattr".

You can also access the resource fork as a file by appending 
"/..namedfork/rsrc" to the path.

"du -h" shows me the total file size.  That includes the resource fork and it 
also accounts for the block size.  That is, it's really showing the disk space 
used, the physical size, not just the logical size of the file.

Also, keep in mind that Apple switched some time ago to using powers of 10 for 
disk space units.  So, in the Finder, KB == 1,000 bytes, not 1,024 bytes.  Some 
of the command line tools still powers of 2, depending on options.

Regards,
Ken


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to