how to check file exist or not in unix

echo "enter your file name"

read file

if [ -e $file ]

then

echo "file exist"

else

echo "file not exist"

fi

Post a Comment

If you have any doubts, Please let me know
Thanks!

Previous Post Next Post