Does anyone know the correct way to use the command line to "zip" and "unzip" a Mac application? It seems the unzipped version application is not recognized as an application any more, and its size is "shrinked" compare to the original one.
If we assume that your application is called Application.app in /Applications (not if you have extensions hidden you will not see the .app in the Finder, but all apps end in .app) then we can do this:
Code:
tar -cf ~/Desktop/Application.tar /Applications/Application.app
gzip ~/Desktop/Application.tar
This will result in a compressed archive of Application.app being created on your desktop called Application.tar.gz. This will work when you expand it (which you can do via the Finder.
I normally use tar czvf archive.tgz folder and a couple of Mac OS updates ago this command started adding all Mac OS X specific meta data in ._files that gets added when I tar them.
Anyone know how to avoid those annoying meta files?