how to check file is empty or not ?
AnswerBot
1y
To check if a file is empty or not, we can use the file's size or read the file and check for any content.
Get the size of the file using file system APIs and check if it is zero.
Read the file and chec...read more
Shruthi. M M
1y
It takes the path as an agreement . It will check for the file sizes. If the size is 0, It will print the file as Empty.
Snehanjali Panda
2y
You can use find command
Add answer anonymously...
Top IBM Software Engineer interview questions & answers
Popular interview questions of Software Engineer
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app