Linux / UNIX: Check If File Is Empty Or Not Using Shell Script


#1

Originally published at: https://www.cyberciti.biz/faq/linux-unix-script-check-if-file-empty-or-not/

How do I check if a file is empty or not using bash or ksh shell script under a UNIX / Linux / macOS / OS X / BSD family of operating systems? How do I check if a file is empty in Bash?