Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Compression via command line vs finder

I have an executable that is stored as a package file, or folder. When I right-click on the file and compress it, I end up with a zip file that decompresses to the same thing. So far so good. I've been unable to do the same thing via the command line. I tried zip, which ends up saving the contents of the package file, but does not recreate the executable when unzipped. I also tried gzip, but didn't get even that far. Trying to create a tar.gz file didn't work either.


Is there a way to do this?

SR MBP 2.4 4GB, Fusion: XP Pro/Win 7, Mac OS X (10.7), Samsung 226BW, Wired aluminum keyboard

Posted on Aug 14, 2011 12:41 PM

Reply
Question marked as Best reply

Posted on Aug 14, 2011 1:02 PM

Check the zip options (Terminal > man zip) as some options may have changes with Lion.


Note: Command line processing in zip has been changed to support long options and handle all options

and arguments more consistently. Some old command lines that depend on command line inconsistencies

may no longer work


Regards,

Colin R.

3 replies
Question marked as Best reply

Aug 14, 2011 1:02 PM in response to Resn8tor

Check the zip options (Terminal > man zip) as some options may have changes with Lion.


Note: Command line processing in zip has been changed to support long options and handle all options

and arguments more consistently. Some old command lines that depend on command line inconsistencies

may no longer work


Regards,

Colin R.

Aug 14, 2011 2:21 PM in response to Resn8tor

Yes, ditto is the right tool as zip does not support resource forks

"Support for some Mac OS features in the Unix Mac OS X port, such as resource forks, is expected in the next zip release"

Ditto supports OS X:

"ditto will preserve resource forks and HFS meta-data information when copying unless instructed otherwise using --norsrc Similarly, ditto will preserve extended attributes and Access Control Lists (ACLs) unless --noextattr or --noacl is passed."

Also, tar should have worked.

Compression via command line vs finder

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.