Learn the unzip command to inspect and extract ZIP archives from the shell. 23.05.2026 | reading time: 2 min You just downloaded a ZIP and need its contents fast; what now? The `unzip` command lets him inspect, test, and extract ZIP archives directly from the shell. Live demo Here is a simple hands-on example: create a tiny archive, list its contents, extract it into a folder, and show the result. ``` $ echo "Hello" > sample.txt $ zip sample.zip sample.txt adding: sample.txt (stored 0%) $ unzip -l sample.zip Archive: sample.zip Length Date Time Name --------- ---------- ----- ---- 6 2026-05-23 12:00 sample.txt --------- ------- 6 1 file $ unzip sample.zip -d extracted Archive: sample.zip inflating: extracted/sample.txt $ cat extracted/sample.txt Hello ``` Options to know Several flags make `unzip` powerful in scripts and on the terminal: `-l` lists archive contents without extracting, `-t` tests integrity, `-d` specifies the destination directory, `-o` overwrites files without prompting, `-j` discards directory paths and `-x` excludes specific files. Practical use cases Use `unzip` to inspect downloads before extraction, to extract only a subset of files, or to stream a file to stdout with `-p` for quick previews; he can combine it with `find` or a shell loop for batch jobs. Related utilities ZIP-focused tasks often pair `unzip` with creation and alternative tools: `zip` to build archives, `7z`/`7zip` for multi-format compression and stronger ratios, and `tar` variants when working with non-ZIP archives. Wrap-up and next steps Mastering `unzip` saves time on everyday file handling and on automation; practice with real archives and try combining flags in short scripts. Keep exploring Linux tools and consider formalizing skills with certifications like CompTIA Linux+ or LPIC-1, and look into bitsandbytes.academy for intensive exam preparation. Join Bits & Bytes Academy First class LINUX exam preparation. utilities storage backup filesystem scripting