Check if File Empty or Not on Linux

#!/bin/bash
 
if [ -s /path/to/myfile.txt ]
then
     echo "File is not empty"
else
     echo "File is empty"
fi

Comments