我正在使用zip
命令来压缩文件,例如zip -r - file1 file2 file3
但是,我们希望在压缩这些文件之前重命名这些文件。
有谁知道是否有办法通过管道传输或以某种方式重命名正在添加到 zip 的文件?
命令zipnote
:
echo -e "@ myOldFileName.txt\n@=myNewFileName.txt" | zipnote -w myzip.zip
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 .*