首个公开版本 RAR 1.3 发布于 1993 年。
RAR 是一种专利文件格式,用于压缩 打包归档数据,开发者为尤金·罗谢尔 (Eugene Roshal); 因此,RAR 的全名为 Roshal ARchive。
尤金·罗谢尔开发 RAR 文件压缩 解压程序,最初用于 DOS,后被移植到其它平台。 Such as: Windows Linux FreeBSD DOS OS/2 MacOSX
尤金·罗谢尔 1972 年 3 月 10 日生于俄罗斯。 毕业于俄罗斯车里雅宾斯克工业大学 (Chelyabinsk Technical University), 也是 RAR 文件管理器的作者。
rar x bootstrap.rar rar a bootstrap.rar ./bootstrap
RAR 文件的主要 Windows 版本编码器,称为 WinRAR,以共享软件的形式发行。
切换到指定目录,下载文件
root:# cd /home/ftp root:/home/ftp# wget https://www.rarlab.com/rar/rarlinux-x64-**.tar.gz
或下载 https://www.rarlab.com/rar/rarlinux-x64-**.tar.gz 后上传至 Linux 操作系统
先解压缩,再编译安装
root:/home/ftp# tar zxvf rarlinux-x64-**.tar.gz root:/home/ftp# cd rar root:/home/ftp/rar# make root:/home/ftp/rar# make install
清理无用内容
root:/home/ftp/rar# cd ../ root:/home/ftp# rm -R /home/ftp/*
基本语法
rar <command> -<switch 1> -<switch N> <archive> <files...> <@listfiles...> <path_to_extract\>
Command
| 参数 | EN 解释 | 中文翻译 | Remark |
|---|---|---|---|
| a | Add files to archive | 把文件添加到存档 | |
| c | Add archive comment | 添加存档注释 | |
| ch | Change archive parameters | 更改存档参数 | |
| cw | Write archive comment to file | 把存档注释写入文件 | |
| d | Delete files from archive | 删除存档文件 | |
| e | Extract files without archived paths | 不带存档路径提取文件 | 当前目录 |
| f | Freshen files in archive | 刷新存档文件 | |
| i[par]=<str> | Find string in archives | 查找存档字符串 | |
| k | Lock archive | 锁定存档 | |
| l[t[a],b] | List archive contents [technical[all], bare] | 列表存档内容 [技术 [所有], 裸露] | |
| m[f] | Move to archive [files only] | 移至存档 [仅文件] | |
| p | Print file to stdout | 把文件打印到标准输出 | |
| r | Repair archive | 修理存档 | |
| rc | Reconstruct missing volumes | 重新构造丢失卷 | |
| rn | Rename archived files | 重命名存档文件 | |
| rr[N] | Add data recovery record | 添加数据恢复记录 | |
| rv[N] | Create recovery volumes | 创建恢复卷 | |
| s[name|-] | Convert archive to or from SFX | 转换存档成或来自 SFX | |
| t | Test archive files | 测试存档文件 | |
| u | Update files in archive | 更新存档文件 | |
| v[t[a],b] | Verbosely list archive contents [technical[all],bare] | 详细列表存档 [技术 [所有], 裸露] | |
| x | Extract files with full path | 带完整路径提取文件 |
| 参数 | EN 解释 | 中文翻译 | Remark |
|---|---|---|---|
| - | Stop switches scanning | 停止开关扫描 | |
| @[+] | Disable [enable] file lists | 禁用 [启用] 文件列表 | |
| ad | Append archive name to destination path | 把存档名追加到目的地路径 | |
| ag[format] | Generate archive name using the current date | 用当前日期生成存档名 | |
| ai | Ignore file attributes | 忽略文件属性 | |
| ap<path> | Set path inside archive | 设置存档内路径 | |
| as | Synchronize archive contents | 同步存档内容 | |
| c- | Disable comments show | 禁用展示注释 | |
| cfg- | Disable read configuration | 禁用读取配置 | |
| cl | Convert names to lower case | 把名称转换成小写 | |
| cu | Convert names to upper case | 把名称转换成大写 | |
| df | Delete files after archiving | 存档后删除文件 | |
| dh | Open shared files | 打开共享文件 | |
| ds | Disable name sort for solid archive | 禁用实体存档名称排序 | |
| dw | Wipe files after archiving | 存档后擦去文件 | |
| e[+]<attr> | Set file exclude and include attributes | 设置文件排除 包括属性 | |
| ed | Do not add empty directories | 不添加空目录 | |
| en | Do not put 'end of archive' block | 不放置 "存档结束" 块 | |
| ep | Exclude paths from names | 从名称排除路径 | |
| ep1 | Exclude base directory from names | 从名称排除基本目录 | |
| ep3 | Expand paths to full including the drive letter | 把路径展开成完整包括盘符 | |
| f | Freshen files | 刷新文件 | |
| hp[password] | Encrypt both file data and headers | 加密文件数据 头两者 | |
| ht[b|c] | Select hash type [BLAKE2,CRC32] for file checksum | 选择文件校验和哈希类型 [BLAKE2,CRC32] | |
| id[c,d,p,q] | Disable messages | 禁用消息 | |
| ierr | Send all messages to stderr | 把所有消息发送到标准错误 | |
| ilog[name] | Log errors to file | 把错误日志输出到文件 | |
| inul | Disable all messages | 禁用所有消息 | |
| isnd | Enable sound | 启用声音 | |
| iver | Display the version number | 显示版本号 | |
| k | Lock archive | 锁定存档 | |
| kb | Keep broken extracted files | 保持已断开提取文件 | |
| log[f][=name] | Write names to log file | 把名称写入日志文件 | |
| m<0..5> | Set compression level (0-store...3-default...5-maximal) | 设置压缩级别 (0-存储...3-默认...5-最大) | |
| ma[4|5] | Specify a version of archiving format | 指定存档格式版本 | |
| mc<par> | Set advanced compression parameters | 设置高级压缩参数 | |
| md<n>[k,m,g] | Dictionary size in KB, MB or GB | 字典尺寸 KB MB 或 GB | |
| ms[ext;ext] | Specify file types to store | 指定存储文件类型 | |
| mt<threads> | Set the number of threads | 设置线程数 | |
| n<file> | Additionally filter included files | 附加过滤包括文件 | |
| n@ | Read additional filter masks from stdin | 从标准输入读取附加过滤掩码 | |
| n@<list> | Read additional filter masks from list file | 从列表文件读取附加过滤掩码 | |
| o[+|-] | Set the overwrite mode | 将覆写模式 | |
| oh | Save hard links as the link instead of the file | 把硬链接,另存为链接而不是文件 | |
| oi[0-4][:min] | Save identical files as references | 把恒等文件另存为参考 | |
| ol[a] | Process symbolic links as the link [absolute paths] | 把符号链接,处理成链接 [绝对路径] | |
| or | Rename files automatically | 自动重命名文件 | |
| ow | Save or restore file owner and group | 保存或还原文件所有者 组 | |
| p[password] | Set password | 设置密码 | |
| p- | Do not query password | 不查询密码 | |
| qo[-|+] | Add quick open information [none|force] | 添加急速打开信息 [无|强制] | |
| r | Recurse subdirectories | 递归子目录 | |
| r- | Disable recursion | 禁用递归 | |
| r0 | Recurse subdirectories for wildcard names only | 仅递归针对通配符名的子目录 | |
| rr[N] | Add data recovery record | 添加数据恢复记录 | |
| rv[N] | Create recovery volumes | 创建恢复卷 | |
| s[<N>,v[-],e] | Create solid archive | 创建实体存档 | |
| s- | Disable solid archiving | 禁用实体存档 | |
| sc<chr>[obj] | Specify the character set | 指定字符集 | |
| sfx[name] | Create SFX archive | 创建 SFX 存档 | |
| si[name] | Read data from standard input (stdin) | 从标准输入读取来数据 | |
| sl<size> | Process files with size less than specified | 处理小于指定尺寸的文件 | |
| sm<size> | Process files with size more than specified | 处理大于指定尺寸的文件 | |
| t | Test files after archiving | 存档后测试文件 | |
| ta<date> | Process files modified after <date> in YYYYMMDDHHMMSS format | 处理 YYYYMMDDHHMMSS 格式 <date> 后的修改文件 | |
| tb<date> | Process files modified before <date> in YYYYMMDDHHMMSS format | 处理 YYYYMMDDHHMMSS 格式 <date> 前的修改文件 | |
| tk | Keep original archive time | 保留原存档时间 | |
| tl | Set archive time to latest file | 把存档时间设为最新文件 | |
| tn<time> | Process files newer than <time> | 处理比 <time> 更新的文件 | |
| to<time> | Process files older than <time> | 处理比 <time> 更旧的文件 | |
| ts[m|c|a] | Save or restore file time (modification, creation, access) | 保存或还原文件 (修改 创建 访问) 时间 | |
| u | Update files | 更新文件 | |
| v | Create volumes with size autodetection or list all volumes | 以自动检测尺寸创建卷,或列表所有卷 | |
| v<size>[k,b] | Create volumes with size=<size>*1000 [*1024, *1] | 创建 size=<size>*1000 [*1024, *1] 卷 | |
| ver[n] | File version control | 文件版本控制 | |
| vn | Use the old style volume naming scheme | 使用旧样式卷命名方案 | |
| vp | Pause before each volume | 在各卷前暂停 | |
| w<path> | Assign work directory | 指派工作目录 | |
| x<file> | Exclude specified file | 排除特定文件 | |
| x@ | Read file names to exclude from stdin | 从标准输入读取要排除文件名 | |
| x@<list> | Exclude files listed in specified list file | 排除指定列表文件列出的文件 | |
| y | Assume Yes on all queries | 假定所有查询为 Yes | |
| z[file] | Read archive comment from file | 从文件读取存档注释 |
| Function | 命令 | 文字解释 | 示例 | 示例解释 |
|---|---|---|---|---|
| 解压 | rar x Archive.rar | 把存档解压到当前目录 | rar x bootstrap.rar | 以完整路径形式,将 bootstrap.rar 解压到当前目录 |
| 压缩 | rar a Archive.rar ./Archive | 把 ./Archive 目录下所有内容添加到存档 | rar a bootstrap.rar ./bootstrap | 把 ./bootstrap 目录下所有文件 子目录,添加到 bootstrap.rar 存档 |
| Version | rar iver | 展示版本信息 | ||
| 帮助 | rar -? | 展示帮助信息 |
Copyright Notice: This article is an exclusive original manuscript, copyright belongs to Happy Digits Software , shall not be reproduced without permission.