Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Another way to unzip zip archives from the command line UNIX
No need to look for an unzip command (even though there is one); just run the following command to unzip zip archives from the Terminal:
% open filename.zip
Since zip files unzip with a double-click, the open command does the same thing.
    •    
  • Currently 2.33 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (6 votes cast)
 
[27,758 views]  

Another way to unzip zip archives from the command line | 3 comments | Create New Account
Click here to return to the 'Another way to unzip zip archives from the command line' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Another way to unzip zip archives from the command line
Authored by: zedwards on Jan 12, '04 11:11:21AM
Why not:
unzip foo.zip

You cannot run this command if you are without Aqua (i.e. remote) as it just opens up the zip GUI command.

[ Reply to This | # ]
Another way to unzip zip archives from the command line
Authored by: mudpup on Jan 12, '04 11:27:28PM
There definitely is more than one way to skin this cat. And reasons to use different tools, example: I just down loaded a new free album from http://www.comfortstand.com/ and some thing was funky about the zip archive I got. When I tried the double clicking a unarchiving window opens and I can tell my machine is chewing on what should be in a blink, a done deal (I mean go get a drink, come back and every thing has slowed because of this effort kind of job). I get tried of waiting and cancel the job. Rather than burn more bandwidth, I open terminal and try my favorite can opener.
tar -xvf filename.zip
Works for almost anything on a redhat linux box, but no joy this time. Bash (terminal) called me a dummy and said the file had bad obsolescent base-64 headers. Not one to take a hint I tried.
gunzip filename.zip
unknown suffix -- ignored Maybe This is a lost cause. I may have to give up and down load again. What the hey I try.
unzip filename.zip
Guess what!
Archive: csr005.zip creating: csr005/ extracting: csr005/csr005-03-the-apartment-the-moon-is-full.mp3 extracting: csr005/csr005-01-the-apartment-alone-now.mp3 extracting: csr005/csr005-02-the-apartment-dig-a-hole.mp3 extracting: csr005/csr005-05-the-apartment-ooh-what-fun.mp3 extracting: csr005/csr005-04-the-apartment-flowing.mp3 extracting: csr005/csr005.jpg extracting: csr005/threeforks-slimart.jpg
New Music, iTunes here we come. So what was the deal? I don't have a clue as to why double clicking did not work. But I do know there are many unix archiving unarchiving tools some are named for what they do and what type files they work on. I know of a hand full; tar, gzip, gunzip, zip, unzip, bzip2, bunzip2, bzip2recover, compress, uncopress, pax, cpio. You can find man pages for all of these and more. Go ahead open your terminal and try
man more
More is less, or is that less the opposite of more I don't know....... if unix was any more fun they would make it a game pack for playstation.

[ Reply to This | # ]
Another way to unzip zip archives from the command line
Authored by: patashnik on Jan 13, '04 04:33:38AM
unzip doesn't handle the embedded resourceforks in ZIP files created by the Finder. If you want to unarchive those files from the CLI, use ditto:

ditto -V -x -k --sequesterRsrc --rsrc FILENAME.ZIP DESTINATIONDIRECTORY

If you want to unpack the archive in the current directory, use . as DESTINATIONDIRECTORY

[ Reply to This | # ]