Ubuntu文件批量解压

来源:互联网 发布:diff linux命令2c2 编辑:程序博客网 时间:2024/05/22 15:18
#!/bin/sh  #unrar files  #source .rar file path  docSrc="..."  #save unrar file path  unfileSrc="..."  #log file recodes error  errorPath="..."  if [ ! -f $errorPath ]     then          touch $errorPath          chmod 755 $errorPath     break  fi  if [ ! -d "$unfileSrc" ]     then          mkdir $unfileSrc     break  fi  #start unrar files  for file in `find $docSrc -name "*.rar"`  do     sudo unrar x -o- -p- -r -y $file $unfileSrc 2>>$errorPath     echo -e "\n">>$errorPath  done
原创粉丝点击