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

2 1

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!

Sentry image

See why 4M developers consider Sentry, β€œnot bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay