Jump to content


Terminal method of unpacking .7z files?


  • Please log in to reply
5 replies to this topic

#1 DaveyJJ

DaveyJJ

    All hail Bastet

  • Members
  • PipPipPipPipPipPipPipPip
  • 3895 posts
  • Steam Name:DaveyJJ
  • Location:Inside Bastet's secret temple preparing for the catpocalypse.

Posted 28 April 2008 - 08:23 AM

OK, so what would I type in terminal in 10.5.2 to completely batch "unzip" a whole whack of files that have been ar4chived in .7z format? I need help with two things specifically ...

1. leave the unarchived versions in the same directory as the .7z version, and

2. be able to point this command at a "top level" directory and have it work on all .7z files in all sub directories to any level (i.e., file namehere.7z might be in Folder D inside Folder C inside Folder B inside the top level Folder A)

I don't know enough about command line or this weird format to do this by myself. The only commands I know in terminal involve something like -rm -r -f or something that one sysadmin told me never ever to do.  :nods:

Raven 27" i3 iMac 3.2GHz | 12GB RAM | 1TB HD | 512MB 5670 ATI Radeon HD
Crow iPad 2 | 32GB WiFi


"Not my circus, not my monkeys." -- Polish folk saying
"In ancient times cats were worshipped as gods; they have not forgotten this." -- Terry Pratchett
"I love cats because I enjoy my home; and little by little, they become its visible soul." -- Jean Cocteau


#2 teflon

teflon

    Bastard of the Popeye Analogy

  • Members
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 9589 posts
  • Location:London, UK

Posted 28 April 2008 - 09:30 AM

ha!, I have absolutely no idea im afraid...

perhaps try this??

it says it does folders, so you might be able to do the whole HD like that?

I dunno about keeping things in the same place though, but I dont think that its moved things on the few occasions that Ive used it.
Polytetrafluoroethylene to my friends.

Macbook Pro - C2D 2.4Ghz / 4GB RAM / Samsung 830 256GB SSD / Geforce 8600M GT 256Mb / 15.4"
Cube - G4 1.7Ghz 7448 / 1.5GB RAM / Samsung Spinpoint 250GB / Geforce 6200 256Mb
Self-built PC - C2Q Q8300 2.5Ghz / 4GB RAM / Samsung 830 256GB SSD / Radeon 7850 OC 1GB / W7 x64
and a beautiful HP LP2475w 24" H-IPS monitor

#3 Quicksilver

Quicksilver

    Verbal Windbag

  • IMG Writers
  • 4227 posts
  • Location:Chicago Illinois
  • Pro Member:Yes

Posted 28 April 2008 - 09:40 AM

I prefer this 7z decompression app (download link).
Former Senior Hardware Editor
InsideMacGames.com

#4 DaveyJJ

DaveyJJ

    All hail Bastet

  • Members
  • PipPipPipPipPipPipPipPip
  • 3895 posts
  • Steam Name:DaveyJJ
  • Location:Inside Bastet's secret temple preparing for the catpocalypse.

Posted 28 April 2008 - 11:41 AM

View PostQuicksilver, on April 28th 2008, 11:40 AM, said:

I prefer this 7z decompression app (download link).

http://sixtyfive.xmg...m/products/7zx/ ... it's on my list to try this evening. Can it do the whole batch thing though (I can't test right now at work on my "pee-cee") i.e., me drop a folder containing folders within folders within folders and .7z files inside that?

Raven 27" i3 iMac 3.2GHz | 12GB RAM | 1TB HD | 512MB 5670 ATI Radeon HD
Crow iPad 2 | 32GB WiFi


"Not my circus, not my monkeys." -- Polish folk saying
"In ancient times cats were worshipped as gods; they have not forgotten this." -- Terry Pratchett
"I love cats because I enjoy my home; and little by little, they become its visible soul." -- Jean Cocteau


#5 Quicksilver

Quicksilver

    Verbal Windbag

  • IMG Writers
  • 4227 posts
  • Location:Chicago Illinois
  • Pro Member:Yes

Posted 28 April 2008 - 06:20 PM

Sorry, it just handles drag-and-drop of 7z files, not whole folders.
Former Senior Hardware Editor
InsideMacGames.com

#6 Tesseract

Tesseract

    Unmanageable Megaweight

  • Members
  • PipPipPipPipPipPipPipPip
  • 3512 posts
  • Pro Member:Yes

Posted 29 April 2008 - 07:17 AM

The command-line package to do this is p7zip, specifically the 7za command. It's available through MacPorts or Fink. A typical extract command:
7za x archive.7z

To extract all the 7z files under a directory you'd do something like this:
find <startdir> -name "*.7z" -exec 7za x {} \;
(where <startdir> is the top-level directory containing all the archives).