Skip to main content

Check File Exists


FILE="/etc/iptables/rules.v4"

if [ -f "$FILE" ]; then
    echo "$FILE exists"
else
    echo "$FILE empty"
fi