LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

funzip

extract the first member of a ZIP or gzip archive from a pipe

TLDR

Extract first file from a ZIP archive via stdin
$ cat [file.zip] | funzip > [output]
copy
Extract from a gzip file via stdin
$ cat [file.gz] | funzip > [output]
copy
Download and extract in one step
$ curl -s [url/file.zip] | funzip > [output]
copy
Extract from a file argument directly
$ funzip [file.zip] > [output]
copy
Extract a password-protected ZIP archive
$ funzip -[password] [file.zip] > [output]
copy
Extract a tar.zip archive using a secondary archiver
$ cat [archive.tar.zip] | funzip | tar xf -
copy

SYNOPSIS

funzip [-password] [input[.zip|.gz]]

DESCRIPTION

funzip acts as a filter to extract the first member from a ZIP archive or a gzip file. Without a file argument, it reads from standard input and writes to standard output. When given a file argument, it reads from that file instead. It also handles gzip compressed files.This is most useful for extracting single-file archives from pipes without creating intermediate files, or in combination with a secondary archiver like tar(1) for tape backups.

PARAMETERS

-password

Decryption password for encrypted ZIP archives. Passing passwords on the command line is insecure as they may be visible via ps(1).

INSTALL

sudo apt install unzip
copy
sudo dnf install unzip
copy
sudo pacman -S unzip
copy
sudo apk add unzip
copy
sudo zypper install unzip
copy
brew install unzip
copy
nix profile install nixpkgs#unzip
copy

CAVEATS

Only extracts the first member from a ZIP archive. For multi-file archives, use unzip instead. When the first member is a directory, funzip simply creates it and exits.

SEE ALSO

gzip(1), unzip(1), unzipsfx(1), zip(1), zipinfo(1)

Copied to clipboard
Kai