我有一个ZIP文件,其中有一个存储所有文件的顶级目录:
Release/
Release/file
Release/subdirectory/file
Release/subdirectory/file2
Release/subdirectory/file3
我想提取所有内容Release
,以保留目录结构,但是在运行此命令时:
unzip archive.zip Release/* -d /tmp
它创建顶部Release
文件夹:
/tmp/Release/
/tmp/Release/file
/tmp/Release/subdirectory/file
/tmp/Release/subdirectory/file2
/tmp/Release/subdirectory/file3
我如何在Release
不创建Release
文件夹的情况下提取其中的所有内容,如下所示:
/tmp/
/tmp/file
/tmp/subdirectory/file
/tmp/subdirectory/file2
/tmp/subdirectory/file3
@George这仍然会创建一个
—
jsta
Release
文件夹
unzip archive.zip && mv Release/* .