在Linux上实现 Windows 回收站功能的脚本(2)

else
                if [[ "$2" != ""  ]]; then
                       until [ "$2" == ""  ]
                       do
                                 #echo "function is running"
                                 du -s $2 2> /tmp/rm.dump |while read line
                                 do
                                        size=`echo $line | awk '$1 >2000000{print $1}'`
                                        if [ "$size" > "1900000" ];then
                                                echo "Lager than 2Mb"
                                                rm.bak -rf $2
                                        else
                                                TestDir

fi
                                        shift
                                 done
                                 shift
                        done
                else
                        echo -e "No file detected./nTry 'rm --help' for more information. "
                fi
        fi
else
        echo -e "rm: missing operand /nTry 'rm --help' for more information."
fi


--------------------------------------------------------------------------------

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wwjfsy.html