Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

wesleyh

macrumors 6502
Original poster
Mar 23, 2007
432
0
Can anyone tell me how this is possible? The files in these two folders are exactly the same, but the file size reported for the folders is different. Any ideas?

Are there any other folder info bits that I can't check via the finder, but need to do via terminal or something?

6435ah.jpg
 
Last edited by a moderator:
How have you decided that they files are the same? At what level? A simple diff? Something more? For example have you checked whether one has meta data in extended attributes?

What are the results of xattr on the two files?

Or have you considered hidden files (files starting with . or hidden using the OSX hidden flag)? What do you get if you ls -l each directory (and each sub directory) in the terminal?
 
Hi, thanks for your quick reply, yes i have checked with the "changes" program which does a diff. Only one small difference of a string "notworking" vs "working" in info.plist

How do i check xattr etc?

Here is the terminal output:


imac:untitled folder Wesley$ ls -lh
total 0
drwxr-xr-x 3 Wesley staff 102B 31 mei 17:33 NotWorking
drwxr-xr-x 4 Wesley staff 136B 3 nov 11:59 Working


------

NOTWORKING


imac:untitled folder Wesley$ cd NotWorking/
imac:NotWorking Wesley$ ls -lh
total 0
drwxr-xr-x@ 5 Wesley staff 170B 3 nov 22:08 Contents

imac:NotWorking Wesley$ cd Contents/
imac:Contents Wesley$ ls -lh
total 16
drwxr-xr-x@ 7 Wesley staff 238B 3 nov 21:46 Resources
-rw-r--r--@ 1 Wesley staff 5,6K 3 nov 21:37 info.plist


imac:Contents Wesley$ cd Resources/
imac:Resources Wesley$ ls -lh
total 120
-rw-r--r--@ 1 Wesley staff 1,2K 23 jun 17:01 dsa_pub.pem
-rw-r--r--@ 1 Wesley staff 38K 10 jun 10:37 icon.icns
-rw-r--r--@ 1 Wesley staff 5,1K 4 jul 09:53 script.js
-rw-r--r--@ 1 Wesley staff 937B 4 jul 10:00 style.css
-rw-r--r--@ 1 Wesley staff 478B 3 jul 14:36 template.html

------

WORKING


imac:untitled folder Wesley$ cd Working/
imac:Working Wesley$ ls -lh
total 0
drwxr-xr-x 5 Wesley staff 170B 3 nov 11:59 Contents

imac:Working Wesley$ cd Contents/
imac:Contents Wesley$ ls -hl
total 16
-rw-r--r--@ 1 Wesley staff 5,6K 3 nov 21:36 Info.plist
drwxr-xr-x 8 Wesley staff 272B 3 nov 15:37 Resources

imac:Contents Wesley$ cd Resources/
imac:Resources Wesley$ ls -lh
total 120
-rw-r--r--@ 1 Wesley staff 1,2K 23 jun 17:01 dsa_pub.pem
-rw-r--r--@ 1 Wesley staff 38K 10 jun 10:37 icon.icns
-rw-r--r--@ 1 Wesley staff 5,1K 3 nov 15:24 script.js
-rw-r--r--@ 1 Wesley staff 937B 3 nov 15:23 style.css
-rw-r--r--@ 1 Wesley staff 478B 3 nov 15:23 template.html
 
What about ls -al (a to show all files including hidden ones). At this point one or more hidden files looks most likely.

If that doesn't show differences xattr <filename> on each file and directory and look for differences!
 
Another test you could do is find out what the du (disk usage) command reports the size of those folders to be.

Code:
du -h '~/Desktop/untitled folder/Working'
du -h '~/Desktop/untitled folder/Not Working'
 
Last edited:
imac:untitled folder Wesley$ ls -la Working/ NotWorking/
NotWorking/:
total 0
drwxr-xr-x 3 Wesley staff 102 31 mei 17:33 .
drwxr-xr-x 5 Wesley staff 170 3 nov 22:08 ..
drwxr-xr-x@ 5 Wesley staff 170 3 nov 22:08 Contents

Working/:
total 16
drwxr-xr-x 4 Wesley staff 136 3 nov 11:59 .
drwxr-xr-x 5 Wesley staff 170 3 nov 22:08 ..
-rw-r--r--@ 1 Wesley staff 6148 3 nov 11:57 .DS_Store
drwxr-xr-x 5 Wesley staff 170 3 nov 11:59 Contents

imac:untitled folder Wesley$ du -sh Working/ NotWorking/
92K Working/
76K NotWorking/



OK, is that .DS_Store the culprit? Why is it not being created?
 
.DS_Store is used by the Finder to store layout of the Finder window/sort order etc for that folder. It shouldn't make any difference to anything apart from the Finder.

Perhaps if you told us more about what isn't working (I assume something is not doing what you expect based on the outer folder names) we could help more?
 
Well can't really say much about that just that one version works on a G4 system, and the other doesn't. (Renamed as folder.extension) for use with a specific product.
 
Well the .DS_Store file does not appear large enough to equate for the total difference. It could be there are other hidden files or essential data hidden in an extended attribute.
 
You're right, here's an updated picture with hidden files shown, I'll now check xattr on all files to see if there's anything else:

http://i44.tinypic.com/218ttu.png

(Note after I set to show hidden files the DSstore was created for the other folder too)

----------

OK i find an attribute com.apple.quarantine ! On the contents folder of notworking. What is this?
 
OK i find an attribute com.apple.quarantine ! On the contents folder of notworking. What is this?

From memory it's an attribute Safari adds to stuff downloaded from the Internet so the Finder knows not to open it without showing the annoying warning message.

As per the man page you can use

Code:
xattr -d com.apple.quarantine <filename>

to remove it...
 
OK, the size is now the same! apart from the name (7 bytes difference) - sending to the guy with the G4 to test if this will work..

Though that quarantine bit probably doesn't even exist in G4 so I don't know why a g4 would have trouble with that..
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.