【linux – Unix系统(“unzip archive.zip”)静默提取Zip文件】教程文章相关的互联网学习教程文章

linux – Unix系统(“unzip archive.zip”)静默提取Zip文件【代码】

如何在不显示状态的情况下静默提取文件. 之前问过这个问题,希望能在这里得到更好的答案.解决方法:男子解压缩:-q perform operations quietly (-qq = even quieter). Ordinarilyunzip prints the names of the files it's extracting or testing,the extraction methods, any file or zipfile comments that may bestored in the archive, and possibly a summary when finished witheach archive. The -q[q] options...

linux – Unix unzip:如何批量解压缩文件夹中的zip文件并保存在子文件夹中?【代码】

假设我有一个文件夹’images’,里面有0001.zip到9999.zip,我想解压缩所有这些并将它们保存在具有文件名的子文件夹中,例如,0001.zip将被解压缩并且保存到/ 0001,0002.zip将解压缩并保存到/ 0002,我试着这样做unzip '*.zip'但是它会提取当前文件夹中的所有文件.解决方法:你可以这样做:for file in *.zip; dodir=$(basename "$file" .zip) # remove the .zip from the filenamemkdir "$dir"cd "$dir" && unzip ../"$file" && rm ../"...