linux 批量进行:解压缩某一类压缩文件类型的文件

1: 编写脚本


  1 [oracle@oracle oracle]$ vim unzip.sh
  2 ziphome=/u01/app/oracle
  3 ziplist=`du -a $ziphome |grep '.zip$'| awk '{print $2}'`
  4 for loop in $ziplist
  5 do
  6 cd ${loop%/*}
  7 unzip -o $loop
  8 done
  9 [oracle@oracle oracle]$ chmod 775 unzip.sh
 10 [oracle@oracle oracle]$ ./unzip.sh


执行脚本视图:


image

原文地址:https://www.cnblogs.com/ios9/p/7666290.html