stat command filesize reporting on busybox
- by datadevil
I'm trying to write a shell script in busybox to check the filesize of a file.
Having read that stat is more reliable then ls, I decided to use that, but somehow when using the following command:
stat -c %s filename
I get the following output: 559795. This goes for the following 2 files (shown using ls -la):
0 Jan 20 16:32 foo_empty
4 Jan 20 16:32 foo_not_empty
Anyone know what's happening there? I can just go back to using ls, but I'm not understanding what's happening here, and that's bothering me..