Which goes faster on Linux/Unix?
du -b file.dat
or:
stat -c %s file.dat
feedback
|
|
It seems du is slightly faster in this example.
But personally, I'd prefer to use stat, because most people use stat to retrieve basic information of a single file. So it's more likely stat will be optimized for such jobs in future. | |||
feedback
|
|
You can use the
| |||
|
feedback
|