查找/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
查找/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