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 MuntahaBrought to you by Warp, a free terminal reimagined to work like a modern app.
file
Command
Copy
[[ -s file ]]
Tags
Edit in GitHub
Copied