linuxarj工具命令介绍

韵味老鸟 2024-08-13 13:41:37

linux arj 工具命令介绍

arj命令是用于创建和管理.arj格式压缩包的工具,尽管这种格式在Linux中不如.zip或.tar.gz常见,但它仍然被一些用户使用。以下是arj命令的基本介绍和常用操作。

一:安装部署

root@uk8s:~# which arj

root@uk8s:~# arj

找不到命令 “arj”,但可以通过以下软件包安装它:

apt install arj

root@uk8s:~# apt install arj

正在读取软件包列表... 完成

正在分析软件包的依赖关系树... 完成

正在读取状态信息... 完成

下列【新】软件包将被安装:

arj

升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 6 个软件包未被升级。

需要下载 222 kB 的归档。

解压缩后会消耗 692 kB 的额外空间。

获取:1 http://mirrors.aliyun.com/ubuntu focal/universe amd64 arj amd64 3.10.22-23 [222 kB]

已下载 222 kB,耗时 0秒 (1,022 kB/s)

正在选中未选择的软件包 arj。

(正在读取数据库 ... 系统当前共安装有 124980 个文件和目录。)

准备解压 .../arj_3.10.22-23_amd64.deb ...

正在解压 arj (3.10.22-23) ...

正在设置 arj (3.10.22-23) ...

正在处理用于 man-db (2.10.2-1) 的触发器 ...

Scanning processes...

Scanning linux images...

Running kernel seems to be up-to-date.

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host.

操作选项a:添加文件到压缩包。e:提取压缩包中的文件。l:列出压缩包中的文件。u:更新压缩包中的文件。d:删除压缩包中的文件。

root@uk8s:~# arj

ARJ32 v 3.10, Copyright (c) 1998-2004, ARJ Software Russia.

Processing archive: /usr/bin/arj

Archive created: 2026-10-19 01:35:40, modified: 2019-08-13 14:43:00

List of frequently used commands and switches. Type ARJ -? for more help.

Usage: ARJ <command> [-<sw> [-<sw>...]] <archive_name> [<file_names>...]

Examples: ARJ a -e archive, ARJ e archive, ARJ l archive *.doc

<Commands>

ac: Add Chapter to chapter archive l: List contents of archive

a: Add files to archive m: Move files to archive

c: Comment archive files t: Test integrity of archive

d: Delete files from archive u: Update files to archive

e: Extract files from archive v: Verbosely list contents of archive

f: Freshen files in archive x: eXtract files with full pathname

<Switches>

c: skip time-stamp Check r: Recurse subdirectories

e: Exclude paths from names u: Update files (new and newer)

f: Freshen existing files v: enable multiple Volumes

g: Garble with password w: assign Work directory

i: with no progress Indicator x: eXclude selected files

m: with Method 0, 1, 2, 3, 4 y: assume Yes on all queries

n: only New files (not exist) hk: enable ARJ-PROTECT damage protection

案例:

root@uk8s:~# ls

f1.o f2.o link.a link.bak snap

root@uk8s:~# arj a file.arj *

ARJ32 v 3.10, Copyright (c) 1998-2004, ARJ Software Russia.

Creating archive : file.arj

Adding f1.o 0.0%

Adding f2.o 0.0%

Adding link.a 37.9%

Adding link.bak 37.9%

4 file(s)

Can't find snap/*

Found 1 error(s)!

root@uk8s:~# ls

f1.o f2.o file.arj link.a link.bak snap

root@uk8s:~# file file.arj

file.arj: ARJ archive data, v11, slash-switched, original name: , os: Unix

0 阅读:0