Extracting a single file from a zip archive

Geoff Shang geoff at QuiteLikely.com
Thu Jun 12 11:42:58 UTC 2014


On Thu, 12 Jun 2014, John J. Boyer wrote:

> How do I extract a single file from a zip archive, such as a book
> downloaded from Bookshare? I wish to extract only the xml file.

First, you can run:

unzip -Z <zipfile>

to see what's in it.  Then run:

unzip <zipfile> <file>

Note that if there is a subdirectory in the zipfile, you'll need to 
specify it.  If you don't want this subdir created when you extract the 
file, use the -j switch.

This is valid for Unzip 6.0.

HTH,
Geoff.




More information about the Blinux-list mailing list