如何在Ubuntu操作系統(tǒng)中解壓zip文件?
方法一:通過圖形界面解壓
打開文件管理器定位到zip文件所在目錄,右鍵點擊目標(biāo)文件,選擇「解壓到此處」或「解壓到...」指定存放路徑。系統(tǒng)默認(rèn)使用「歸檔管理器」處理壓縮文件。
方法二:使用unzip命令行工具
步驟1:安裝unzip
sudo apt update && sudo apt install unzip
步驟2:基礎(chǔ)解壓命令
unzip filename.zip
該命令將解壓文件到當(dāng)前工作目錄,保留原始目錄結(jié)構(gòu)。
步驟3:指定解壓路徑
unzip filename.zip -d /target/directory
方法三:處理特殊需求
僅查看壓縮包內(nèi)容
unzip -l filename.zip
覆蓋已存在文件
unzip -o filename.zip
解壓加密文件
unzip -P password filename.zip
常見問題處理
若遇「command not found」錯誤,請先執(zhí)行安裝命令。中文文件名亂碼問題可通過添加-O
參數(shù)指定編碼:
unzip -O GBK filename.zip