Skip to content

TypeScript code snippet – How check is file exist linux?

FILE=/etc/resolv.conf
if [ -f "$FILE" ]; then
    echo "$FILE exists."
else 
    echo "$FILE does not exist."
fi
See also  PHP code snippet - laravel How to query belongsTo relationship?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.