6

我正在使用zip命令来压缩文件,例如zip -r - file1 file2 file3

但是,我们希望在压缩这些文件之前重命名这些文件。

有谁知道是否有办法通过管道传输或以某种方式重命名正在添加到 zip 的文件?

4

2 回答 2

5

命令zipnote

echo -e "@ myOldFileName.txt\n@=myNewFileName.txt" | zipnote -w myzip.zip
于 2013-06-04T16:35:03.117 回答
1

Providing customized name to the outcoming xyz.zip folder is possible. but renaming the input file should be done before it takes input for processing ZIP action.

Following are the possible ways that will create archivefile1.zip file

zip -r archivefile1 .
zip -r archivefile1 .* *
zip -r archivefile1 .*
于 2013-02-03T03:09:53.710 回答