Check if file exists and has a size greater than zero

Returns an exit code of 0 if the file exists and has a size greater than zero.

Authored by: Sidratul Muntaha
file

Command
Copy
[[ -s file ]]
Tags