Zip

如何僅將壓縮存檔中的特定文件夾提取到給定目錄?

  • October 15, 2020

如何從壓縮檔案中提取特定文件夾到給定目錄?

我嘗試使用

unzip "/path/to/archive.zip" "in/archive/folder/" -d "/path/to/unzip/to"

但這只會在我希望它解壓縮到的路徑上創建文件夾,而不會做任何其他事情。

unzip /path/to/archive.zip "in/archive/folder/*" -d "/path/to/unzip/to"

嘗試:

unzip /path/to/archive.zip 'in/archive/folder/*' -d /path/to/unzip/to

引用自:https://unix.stackexchange.com/questions/59276