首個公開版本 RAR 1.3 發布於 1993 年。
RAR 是一種專利文件格式,用於壓縮 打包歸檔數據,開發者為尤金·羅謝爾 (Eugene Roshal); 因此,RAR 的全名為 Roshal ARchive。
尤金·羅謝爾開發 RAR 文件壓縮 解壓程序,最初用於 DOS,後被移植到其它平颱。 譬如: 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 解釋 | 中文翻譯 | 備注 |
|---|---|---|---|
| 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 解釋 | 中文翻譯 | 備注 |
|---|---|---|---|
| - | 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 | 從文件讀取存檔注釋 |
| 功能 | 命令 | 文字解釋 | 示例 | 示例解釋 |
|---|---|---|---|---|
| 解壓 | rar x Archive.rar | 把存檔解壓到當前目錄 | rar x bootstrap.rar | 以完整路徑形式,將 bootstrap.rar 解壓到當前目錄 |
| 壓縮 | rar a Archive.rar ./Archive | 把 ./Archive 目錄下所有內容添加到存檔 | rar a bootstrap.rar ./bootstrap | 把 ./bootstrap 目錄下所有文件 子目錄,添加到 bootstrap.rar 存檔 |
| 版本 | rar iver | 展示版本信息 | ||
| 幫助 | rar -? | 展示幫助信息 |
版權聲明: 本文為獨傢原創稿件,版權歸 樂數軟件 ,未經許可不得轉載。