Is it possible to print a larger number than a standard 32bit integer?
For example, I need to output the size of a directory in bytes, and the directory is 6GB.
I've tried a few things, but the simplest line is:
The -k option lists the directory size in KB, but I need the (rough) size in bytes so multiply it by 1000, but awk prints it as 6.1444e+09.
I've lived with this problem for ages, but would love to know how to get around it!
Thanks.
For example, I need to output the size of a directory in bytes, and the directory is 6GB.
I've tried a few things, but the simplest line is:
Code:
du -s -k | awk 'print $1*1000}'
The -k option lists the directory size in KB, but I need the (rough) size in bytes so multiply it by 1000, but awk prints it as 6.1444e+09.
I've lived with this problem for ages, but would love to know how to get around it!
Thanks.