#!/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
Ubuntu文件批量解压
最新推荐文章于 2024-06-14 14:09:47 发布