16. Expand archives

If you have an archive file, on your Pi, you’ll need to expand it.

 

Commands for general archive formats:

unzip archiveFileName will extract files from a .zip archive

gunzip compressedFileName will uncompress a .gz compressed file

tar xf archiveFileName will extract files from a .tar archive

tar zxf archiveFileName will extract files from a .tar.gz (or .tgz) archive (both of the previous commands in a single step)

unar archiveFileName will extract files from tons of archive formats, including obsolete ones like StuffIt and DiskDoubler. See The Unarchiver for a full list.

 

Commands for Apple II archive formats:

nulib2 -x archiveFileName will extract files from a ShrinkIt (.SHK, .SDK, .BXY) or Binary II (.BQY, .BNY) archive. This will mostly be useful when the archive contains a full disk image (typically, but not always, indicated as .SDK); if the archive contains files, use one of the commands below. You can view the contents of an archive before expanding with nulib2 -v archiveFileName.

shk2image archiveFileName imageFileName will extract files from a ShrinkIt or Binary II archive to a ProDOS disk image file (if the one you specify doesn’t exist, an 800K image will be created, unless the name you gave ends in “.dsk”, in which case a 140K image will be created). If you want the archive to be expanded directly to virtual drive 1 or 2, use $VSD1 or $VSD2 for imageFileName.

If you want the archive to be expanded into a ProDOS subdirectory rather than at the top level of the disk image, you can supply a ProDOS path, without the volume name, as an additional argument. The subdirectory (and any subdirectories within it) will be created if it doesn’t exist. For example:

shk2image archiveFileName $VSD2 PATH/TO/PRODOS.DIR.NAME

(You can also uncompress ShrinkIt archives on your Apple II by transferring the archive, as I’ll explain in the next post. It’s slower that way, though.)

For other (and older) Apple II formats: sciibin filename will decode a BinSCII file (.BSC, .BSQ); note that .BSQ files produce ShrinkIt archives when decoded, so use nulib2 -x or shk2image on the result. nulib2 -x filename will extract files from a Binary II (.BNY, .BQY) archive, and will automatically uncompress any Squeezed (.QQ) files within the archive; alternatively, unblu filename will extract files from a Binary II archive and usq filename will uncompress Squeezed files. unbit filename > outfilename will decode an EXEC file made by Executioner; unexec filename > outfilename will decode an EXEC file containing monitor input.

Leave a Reply

Your email address will not be published. Required fields are marked *