I was compiling a custom kernel, and I wanted to test the size of the image file. These are the results:
ls -la | grep vmlinux
-rwxr-xr-x 1 root root 8167158 May 21 12:14 vmlinux
du -h vmlinux
3.8M vmlinux
size vmlinux
text data bss dec hex filename
2221248 676148 544768 3442164 3485f4 vmlinux
Since all of them show different sizes, which one is closest to the actual image size? Why are they different?
stat vmlinux
print? – Tirrellls
is reporting the on-disk size, which has nothing to do with whatsize
is reporting.du
is reporting the SAME number, just converted into megabytes instead of bytes. @pavel:ls
uses stat() internally. there's no difference between the two, other than HOW the info's presented. – Ygerne