【Linux部署】Linux环境 .rar 格式文件处理工具安装使用(一波两折避坑指北)
生活随笔
收集整理的這篇文章主要介紹了
【Linux部署】Linux环境 .rar 格式文件处理工具安装使用(一波两折避坑指北)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1.說明
要安裝一個.rar格式的應用,上傳 Linux 系統后發現沒有解壓工具,上網搜索后開始一波三折的旅程。
2.安裝
2.1 跳坑
# 有小伙伴分享安裝方法 yum install rar # 安裝后根本無法使用 unrar 命令2.2 一波三折
WinRAR 官網下載 這里有各種操作系統不同語言的版本,下載注意【坑1??】:
# 查詢系統版本信息是 x86_64 rpm -qi centos-release Name : centos-release Version : 7 Release : 9.2009.1.el7.centos Architecture: x86_64查詢系統版本信息是x86_64是64 bit 的 x86 指令集系統如果點擊RAR 6.11 for Linux x86下載到的rarlinux-x32-611.tar安裝包是32 bit的,安裝后使用報錯:
-bash: /usr/local/bin/rar: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory重新下載64 bit的安裝包rarlinux-x64-611.tar:
# 解壓 安裝 tar -zxvf rarlinux-x32-611.tar cd rar make make install3.使用
【坑2??】安裝成功后用了小伙伴舉例的解壓命令:
# 怎知道這個是 without archived paths unrar e xxx.rar # 帶路徑的用 unrar x xxx.rar # 僅貼出兩個參數 UNRAR 6.11 freeware Copyright (c) 1993-2022 Alexander Roshal Usage: unrar <command> -<switch 1> -<switch N> <archive> <files...><@listfiles...> <path_to_extract\> <Commands>e Extract files without archived pathsx Extract files with full path4.更多
4.1 壓縮命令
RAR 6.11 Copyright (c) 1993-2022 Alexander Roshal 3 Mar 2022 Trial version Type 'rar -?' for helpUsage: rar <command> -<switch 1> -<switch N> <archive> <files...><@listfiles...> <path_to_extract\><Commands>a Add files to archivec Add archive commentch Change archive parameterscw Write archive comment to filed Delete files from archivee Extract files without archived pathsf Freshen files in archivei[par]=<str> Find string in archivesk Lock archivel[t[a],b] List archive contents [technical[all], bare]m[f] Move to archive [files only]p Print file to stdoutr Repair archiverc Reconstruct missing volumesrn Rename archived filesrr[N] Add data recovery recordrv[N] Create recovery volumess[name|-] Convert archive to or from SFXt Test archive filesu Update files in archivev[t[a],b] Verbosely list archive contents [technical[all],bare]x Extract files with full path<Switches>- Stop switches scanning@[+] Disable [enable] file listsad[1,2] Alternate destination pathag[format] Generate archive name using the current dateai Ignore file attributesap<path> Set path inside archiveas Synchronize archive contentsc- Disable comments showcfg- Disable read configurationcl Convert names to lower casecu Convert names to upper casedf Delete files after archivingdh Open shared filesds Disable name sort for solid archivedw Wipe files after archivinge[+]<attr> Set file exclude and include attributesed Do not add empty directoriesep Exclude paths from namesep1 Exclude base directory from namesep3 Expand paths to full including the drive letterep4<path> Exclude the path prefix from namesf Freshen fileshp[password] Encrypt both file data and headersht[b|c] Select hash type [BLAKE2,CRC32] for file checksumid[c,d,n,p,q] Display or disable messagesierr Send all messages to stderrilog[name] Log errors to fileinul Disable all messagesisnd[-] Control notification soundsiver Display the version numberk Lock archivekb Keep broken extracted fileslog[f][=name] Write names to log filem<0..5> Set compression level (0-store...3-default...5-maximal)ma[4|5] Specify a version of archiving formatmc<par> Set advanced compression parametersmd<n>[k,m,g] Dictionary size in KB, MB or GBme[par] Set encryption parametersms[ext;ext] Specify file types to storemt<threads> Set the number of threadsn<file> Additionally filter included filesn@ Read additional filter masks from stdinn@<list> Read additional filter masks from list fileo[+|-] Set the overwrite modeoh Save hard links as the link instead of the fileoi[0-4][:min] Save identical files as referencesol[a] Process symbolic links as the link [absolute paths]op<path> Set the output path for extracted filesor Rename files automaticallyow Save or restore file owner and groupp[password] Set passwordqo[-|+] Add quick open information [none|force]r Recurse subdirectoriesr- Disable recursionr0 Recurse subdirectories for wildcard names onlyrr[N] Add data recovery recordrv[N] Create recovery volumess[<N>,v[-],e] Create solid archives- Disable solid archivingsc<chr>[obj] Specify the character setsfx[name] Create SFX archivesi[name] Read data from standard input (stdin)sl<size> Process files with size less than specifiedsm<size> Process files with size more than specifiedt Test files after archivingta[mcao]<d> Process files modified after <d> YYYYMMDDHHMMSS datetb[mcao]<d> Process files modified before <d> YYYYMMDDHHMMSS datetk Keep original archive timetl Set archive time to latest filetn[mcao]<t> Process files newer than <t> timeto[mcao]<t> Process files older than <t> timets[m,c,a,p] Save or restore time (modification, creation, access, preserve)u Update filesv<size>[k,b] Create volumes with size=<size>*1000 [*1024, *1]ver[n] File version controlvn Use the old style volume naming schemevp Pause before each volumew<path> Assign work directoryx<file> Exclude specified filex@ Read file names to exclude from stdinx@<list> Exclude files listed in specified list filey Assume Yes on all queriesz[file] Read archive comment from file4.2 解壓命令
UNRAR 6.11 freeware Copyright (c) 1993-2022 Alexander RoshalUsage: unrar <command> -<switch 1> -<switch N> <archive> <files...><@listfiles...> <path_to_extract\><Commands>e Extract files without archived pathsl[t[a],b] List archive contents [technical[all], bare]p Print file to stdoutt Test archive filesv[t[a],b] Verbosely list archive contents [technical[all],bare]x Extract files with full path<Switches>- Stop switches scanning@[+] Disable [enable] file listsad[1,2] Alternate destination pathag[format] Generate archive name using the current dateai Ignore file attributesap<path> Set path inside archivec- Disable comments showcfg- Disable read configurationcl Convert names to lower casecu Convert names to upper casedh Open shared filesep Exclude paths from namesep3 Expand paths to full including the drive letterep4<path> Exclude the path prefix from namesf Freshen filesid[c,d,n,p,q] Display or disable messagesierr Send all messages to stderrinul Disable all messageskb Keep broken extracted filesme[par] Set encryption parametersn<file> Additionally filter included filesn@ Read additional filter masks from stdinn@<list> Read additional filter masks from list fileo[+|-] Set the overwrite modeol[a] Process symbolic links as the link [absolute paths]op<path> Set the output path for extracted filesor Rename files automaticallyow Save or restore file owner and groupp[password] Set passwordr Recurse subdirectoriessc<chr>[obj] Specify the character setsi[name] Read data from standard input (stdin)sl<size> Process files with size less than specifiedsm<size> Process files with size more than specifiedta[mcao]<d> Process files modified after <d> YYYYMMDDHHMMSS datetb[mcao]<d> Process files modified before <d> YYYYMMDDHHMMSS datetn[mcao]<t> Process files newer than <t> timeto[mcao]<t> Process files older than <t> timets[m,c,a,p] Save or restore time (modification, creation, access, preserve)u Update filesv List all volumesver[n] File version controlvp Pause before each volumex<file> Exclude specified filex@ Read file names to exclude from stdinx@<list> Exclude files listed in specified list filey Assume Yes on all queries5.總結
首先是尋求小伙伴兒的幫助,然后要去官網,去官網,去官網,如果踩坑再需求小伙伴兒的幫助 😄
總結
以上是生活随笔為你收集整理的【Linux部署】Linux环境 .rar 格式文件处理工具安装使用(一波两折避坑指北)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【SQL编程】Greenplum 实现树
- 下一篇: 【Java代码】京东商品全部分类数据获取