查找/root/目录下是否存在该文件

vim file.sh

#!/bin/bash

#written by lizheng

#about find file

echo "enter a file"

read a

if test -e /root/$a

then echo "the file is exist!"

else echo "the file is not exist!"

fi

spacer.gif