← 返回命令列表

Linux command

unp 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Extract archive

unp [archive.tar.gz]

Extract multiple

unp [file1.zip] [file2.tar.bz2]

Extract into

unp -u [archive.zip]

Simulate extraction

unp -n [archive.tar.gz]

Force extraction

unp -f [archive.zip]

Show supported

unp -s

Pass options

unp [archive.tar.gz] -- [-C] [/tmp]

说明

unp is a shell frontend for various uncompressing and unpacking tools. It automatically detects the format of an archive and calls the appropriate decompression program. Instead of remembering different commands for tar, gzip, bzip2, zip, rar, 7z, and dozens of other formats, users can simply run unp on any archive file. By default, unp extracts to the current directory. It can optionally create a subdirectory for the extracted contents to prevent cluttering the working directory. Arguments after -- are passed to the underlying extraction tool.

参数

-f
Continue even if program availability checks fail or directory collision occurs.
-u
Extract into a subdirectory named after the archive. For Debian packages, extracts data.tar.gz and control.tar.gz separately.
-U
Smart mode: acts like -u if archive contains multiple elements, but places a single file/directory element in the current directory.
-s
Show the list of supported formats.
-n, --dry-run
Display the calculated commands without running them.
-v
Increase output verbosity.
--
Pass subsequent arguments to the backend tool (e.g., tar options).

FAQ

What is the unp command used for?

unp is a shell frontend for various uncompressing and unpacking tools. It automatically detects the format of an archive and calls the appropriate decompression program. Instead of remembering different commands for tar, gzip, bzip2, zip, rar, 7z, and dozens of other formats, users can simply run unp on any archive file. By default, unp extracts to the current directory. It can optionally create a subdirectory for the extracted contents to prevent cluttering the working directory. Arguments after -- are passed to the underlying extraction tool.

How do I run a basic unp example?

Run `unp [archive.tar.gz]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -f do in unp?

Continue even if program availability checks fail or directory collision occurs.