zip and unzip an application

Discussion in 'macOS' started by ohalexis, Jul 27, 2006.

  1. ohalexis macrumors newbie

    Joined:
    Apr 16, 2006
    #1
    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.
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    Don't use zip!

    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.
     
  3. Mitthrawnuruodo Moderator emeritus

    Mitthrawnuruodo

    Joined:
    Mar 10, 2004
    Location:
    Bergen, Norway
    #3
    Related question:

    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?
     

Share This Page