|
发表于 2020-1-9 15:36:01
|
显示全部楼层
#!/bin/sh
echo "read directory name:"
read Ddir
if [ -d $Ddir ]; then
echo "${Ddir} is exists"
if [ -w $Ddir ]; then
rm -rf $Ddir
echo "Remove completed!"
else
echo "You don't have the permission to remove it!"
fi
else
echo "The directory ${Ddir} is not exists!"
fi
|
|