官方下載頁:https://www.rarsoft.com/download.htm(目前最新版本為 RAR 3.71 for Linux),實際使用時以官網提供的最新版為準。
Windows 世界裡最常見的 .zip 與 .rar,在 Linux 上同樣有對應的解壓方案,下面分別說明。
Linux 本身就自帶 zip 與 unzip 這對組合,前者負責壓縮,後者負責解壓。兩者參數繁多,這裡只用最典型的兩個例子帶你上手:
# zip all.zip *.jpg (把所有 .jpg 打包成一個名為 all.zip 的壓縮檔) # unzip all.zip (把 all.zip 裡的檔案全部解開)
想在 Linux 上處理 .rar,就得安裝 RAR for Linux。它可以從網路下載,但要提醒一句:RAR for Linux 並非免費軟體。從 https://www.rarsoft.com/download.htm 取得 RAR 3.60 for Linux 之後,依下列步驟完成安裝:
# tar -xzpvf rarlinux-3.2.0.tar.gz # cd rar # make
安裝完成後,系統裡便會多出 rar 與 unrar 兩個指令,前者壓縮、後者解壓。同樣地,參數很多,先看兩個最常用到的:
# rar a all *.jpg (把所有 .jpg 打包為 all.rar,副檔名會自動附加) # unrar e all.rar (把 all.rar 中的檔案全部解開)
掌握這幾條指令,日常在 Linux 上與 Windows 系統交換壓縮檔就綽綽有餘了。