DEV Community

Cover image for Living in the Shell #8; unzip
Babak K. Shandiz
Babak K. Shandiz

Posted on • Originally published at babakks.github.io on

 

Living in the Shell #8; unzip

unzip πŸŽ‰

Extracts ZIP archive contents.

Test archive integrity -t

unzip -t x.zip
Enter fullscreen mode Exit fullscreen mode

List archive content (short format) -l

unzip -l x.zip
Enter fullscreen mode Exit fullscreen mode

Display exhaustive archive information/content -Zzl

unzip -Zzl x.zip
Enter fullscreen mode Exit fullscreen mode

Extract all files into given path -d

unzip x.zip -d output-dir
Enter fullscreen mode Exit fullscreen mode

Extracts all files into output-dir directory.

Extract specific files

unzip x.zip a.txt b.txt
Enter fullscreen mode Exit fullscreen mode

Extract all, but exclude some files -x

unzip x.zip -x a.txt b.txt
Enter fullscreen mode Exit fullscreen mode

Extracts all but excludes a.txt and b.txt.

Extract with overwrite -o

unzip -o x.zip -d output-dir
Enter fullscreen mode Exit fullscreen mode

Extract without overwrite -n

unzip -n x.zip -d output-dir
Enter fullscreen mode Exit fullscreen mode

Top comments (1)

Collapse
 
waylonwalker profile image
Waylon Walker

Nice examples!

An Animated Guide to Node.js Event Loop

Node.js doesn’t stop from running other operations because of Libuv, a C++ library responsible for the event loop and asynchronously handling tasks such as network requests, DNS resolution, file system operations, data encryption, etc.

What happens under the hood when Node.js works on tasks such as database queries? We will explore it by following this piece of code step by step.