Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

file size command

Status
Not open for further replies.

we2aresame

Technical User
Feb 10, 2003
128
CA
I want to:
if (a file's size=0)
then do something
if
which command I shall use? Thanks.
 
if [ ! -s "${fileName}" ] ; then
echo 'file exists and is empty - do something'
fi;

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top