Linux装机必备-这可能是Linux平台最好用的解压工具

unar是一款强大的跨平台压缩文件解压工具,支持多种格式的压缩文件,并提供丰富的命令行参数以实现灵活的解压操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

前言:

压缩包的出现使得我们在管理文件的时候更加的方便,但是在实际工作中,我们往往会遇到各种后缀的压缩包,在windows上还好,无脑右键即可(安装有对应程序的前提下),但是在Linux上你需要使用各种不同的解压参数,而且压缩包的格式遍地开花,脑子怎么记得过来呢?还好,有人认识到这个严重的问题,于是万能的压缩包解压神器:unar诞生了。

1、帮助信息

首先查看命令帮助

liuyi@l:/media/liuyi/数据/安装包/Linux软件$ unar -h
unar v1.10.1, a tool for extracting the contents of archive files.
Usage: unar [options] archive [files ...]

Available options:
-output-directory (-o) <string>    The directory to write the contents of the archive to. Defaults to the current directory. If set to a single dash (-), no files will be
                                   created, and all data will be output to stdout.
-force-overwrite (-f)              Always overwrite files when a file to be unpacked already exists on disk. By default, the program asks the user if possible, otherwise
                                   skips the file.
-force-rename (-r)                 Always rename files when a file to be unpacked already exists on disk.
-force-skip (-s)                   Always skip files when a file to be unpacked already exists on disk.
-force-directory (-d)              Always create a containing directory for the contents of the unpacked archive. By default, a directory is created if there is more than
                                   one top-level file or folder.
-no-directory (-D)                 Never create a containing directory for the contents of the unpacked archive.
-password (-p) <string>            The password to use for decrypting protected archives.
-encoding (-e) <encoding name>     The encoding to use for filenames in the archive, when it is not known. If not specified, the program attempts to auto-detect the
                                   encoding used. Use "help" or "list" as the argument to give a listing of all supported encodings.
-password-encoding (-E) <name>     The encoding to use for the password for the archive, when it is not known. If not specified, then either the encoding given by the
                                   -encoding option or the auto-detected encoding is used.
-indexes (-i)                      Instead of specifying the files to unpack as filenames or wildcard patterns, specify them as indexes, as output by lsar.
-no-recursion (-nr)                Do not attempt to extract archives contained in other archives. For instance, when unpacking a .tar.gz file, only unpack the .gz file
                                   and not its contents.
-copy-time (-t)                    Copy the file modification time from the archive file to the containing directory, if one is created.
-forks (-k) <visible|hidden|skip>  How to handle Mac OS resource forks. "visible" creates AppleDouble files with the extension ".rsrc", "hidden" creates AppleDouble files
                                   with the prefix "._", and "skip" discards all resource forks. Defaults to "visible".
-quiet (-q)                        Run in quiet mode.
-version (-v)                      Print version and exit.
-help (-h)                         Display this information.
 unar常用选项解释
参数含义
-o指定解压结果保存的位置
-e指定编码
-p指定解压密码

2、实践

最大的特点就是不需要什么乱七八糟的-zxfv还是-zjf这种垃圾参数

liuyi@l:/media/liuyi/数据/安装包/Linux软件$ unar pycharm-community-2020.2.3.tar.gz 
  pycharm-community-2020.2.3/bin/inspect.sh  (296 B)... OK.
  pycharm-community-2020.2.3/bin/printenv.py  (646 B)... OK.
  pycharm-community-2020.2.3/bin/pycharm.sh  (8095 B)... OK.
  pycharm-community-2020.2.3/bin/restart.py  (808 B)... OK.
  pycharm-community-2020.2.3/jbr/bin/jaotc  (12976 B)... OK.
  pycharm-community-2020.2.3/jbr/bin/java  (12944 B)... OK.
  pycharm-community-2020.2.3/jbr/bin/javac  (13000 B)... OK.
  pycharm-community-2020.2.3/jbr/bin/jdb  (12968 B)... OK.
  pycharm-community-2020.2.3/jbr/bin/jfr  (12968 B)... OK.
  pycharm-community-2020.2.3/jbr/bin/jhsdb  (12968 B)... OK.
  pycharm-community-2020.2.3/jbr/bin/jjs  (13000 B)... OK.
  pycharm-community-2020.2.3/jbr/bin/jrunscript  (13008 B)... OK.
  pycharm-community-2020.2.3/jbr/bin/keytool  (12976 B)... OK.
  pycharm-community-2020.2.3/jbr/bin/pack200  (12976 B)... OK.
  pycharm-community-2020.2.3/jbr/bin/rmid  (12968 B)... OK.
  pycharm-community-2020.2.3/jbr/bin/rmiregistry  (12976 B)... OK.
  pycharm-community-2020.2.3/jbr/bin/serialver  (12976 B)... OK.
  pycharm-community-2020.2.3/jbr/bin/unpack200  (121520 B)... OK.
  pycharm-community-2020.2.3/jbr/lib/chrome-sandbox  (238832 B)... OK.
  pycharm-community-2020.2.3/jbr/lib/jcef_helper  (482112 B)... OK.
  pycharm-community-2020.2.3/jbr/lib/jexec  (13176 B)... OK.
  pycharm-community-2020.2.3/jbr/lib/jspawnhelper  (18552 B)... OK.
Successfully extracted to "pycharm-community-2020.2.3".

好了,差不多就行了,别问,问就是很好用。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

坐公交也用券

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值