取当前路径
currentpath = $PWD
遍历根目录
for file in /*
do
if test -f $file
then
echo 是文件
fi
if test -d $file
then
echo 是目录
fi
if test -x $file
then
echo 可执行
fi
if test -w $file
then
echo 可写
fi
echo $file
done