在 CentOS 中安装 7zip

yum install -y p7zip

如果提示找不到,可以尝试安装以下包后,再执行以上安装:

参考自:https://blog.csdn.net/qq_41348266/article/details/122925766

yum install -y epel-release

如有需要,可以替换 epel 源,如清华源:https://mirrors.tuna.tsinghua.edu.cn/help/epel/

sed -e 's!^metalink=!#metalink=!g' \
    -e 's!^#baseurl=!baseurl=!g' \
    -e 's!//download\.fedoraproject\.org/pub!//mirrors.tuna.tsinghua.edu.cn!g' \
    -e 's!//download\.example/pub!//mirrors.tuna.tsinghua.edu.cn!g' \
    -e 's!http://mirrors!https://mirrors!g' \
    -i /etc/yum.repos.d/epel*.repo

唔,压缩命令(不写压缩包扩展名默认为7z,不加后面参数,就是打包当前目录下所有文件):

7za a 压缩包名 文件或目录名

解压命令(默认不加 -o 就是解压在当前目录下,-o 和 输出目录直接不要有空格):

7za x 压缩包名 -o输出目录
posted @ 2021-10-13 18:34  不是豆豆  阅读(715)  评论(0编辑  收藏  举报
友情链接:迷途