allfile=`ls ${localrote}`
for eachfile in $allfile
do
if [ "${eachfile##*.}" = "rar" ];then
echo 解压 $eachfile
/usr/local/bin/unrar e -o+ $eachfile
fi
done
需要怎么修改,才能不解压.svn目录??
...全文
203回复打赏收藏
用rarlinux 解压压缩包的时候,如果想要不解压某些目录,应该怎么写?
如题。 现在有个目录,有一些压缩包A,B,C 里面是一些sql脚本 和.svn目录,这个.svn目录是提交的时候带上去的 现在希望解压的时候,不解压.svn目录,把其他文件都解压掉 已写的代码: allfile=`ls ${localrote}` for eachfile in $allfile do if [ "${eachfile##*.}" = "rar" ];then echo 解压 $eachfile /usr/local/bin/unrar e -o+ $eachfile fi do