Skip to content

2. Unpack an archive

unsqueeze unpacks zip, 7z, Apple Archive, RAR, tar and more, with the same options as unzip.

See what's inside first

% unsqueeze -l backup.7z | head -12
Archive:  backup.7z
  Length      Date    Time    Name
---------  ---------- -----   ----
        0  12-06-2026 10:31   Documents/
        0  12-06-2026 10:31   Documents/Letters/
        0  12-06-2026 10:31   Documents/Notes/
        0  12-06-2026 10:31   Documents/Reports/
        0  12-06-2026 10:31   Documents/Spreadsheets/
   321578  12-05-2026 23:00   Documents/Letters/Letter 01.docx
   123144  12-05-2026 23:00   Documents/Letters/Letter 02.docx
   124207  12-05-2026 23:00   Documents/Letters/Letter 03.docx
   123848  12-05-2026 23:00   Documents/Letters/Letter 04.docx

-l lists the archive without unpacking anything. Here | head -12 shows just the first lines.

Unpack into a folder

% unsqueeze -q backup.7z -d Restore
% ls Restore/Documents
Letters     Notes       Reports     Spreadsheets

-d Restore unpacks into the folder Restore, made if it isn't there. -q keeps it quiet; without it, each file is listed as it's unpacked.

Unpacking is made to be safe:

  • Nothing changes if anything fails. Files are unpacked aside first and put in place only when everything has worked.
  • It never writes through a link, and never outside the folder you unpack into.
  • It checks first that there's enough free space and that the archive won't grow to an absurd size, which stops "zip bombs".

Fill in only what's missing

-n never writes over a file that's already there. Here one note was deleted from Restore, and only it comes back:

% rm 'Restore/Documents/Notes/Note 07.txt'
% unsqueeze -n backup.7z -d Restore
Archive:  backup.7z
 extracting: Documents/Notes/Note 07.txt
Option When a file is already there
(none) As your settings say. To start, the unpacked file gets a new name, such as "Note 07 2.txt", and both are kept (write-new-name).
-n Leave it; unpack only what's missing
-o Write over it, without asking

Archives with a password

unsqueeze asks for the password, as in 4. A password that protects. With a 7z the list of files is hidden until the password is given.