Showing posts with label Zip. Show all posts
Showing posts with label Zip. Show all posts

Unzip files in particular directory or folder under Linux or UNIX

By default, all files and subdirectories are recreated in the current directory; the -d option allows extraction in an arbitrary directory (always assuming one has permission to write to the directory). This option need not appear at the end of the command line; it is also accepted before the zipfile specification (with the normal options), immediately after the zipfile specification, or between the file(s) and the -x option. The option and directory may be concatenated without any white space between them, but note that this may cause normal shell behavior to be suppressed.
Syntax:
unzip {.zip-file-name}-d {/path/to/extract}
For example extract package.zip into /opt, enter:
# unzip package.zip -d /opt
# cd /opt
# ls