$bytes » History » Revision 6
Revision 5 (Per Amundsen, 09/09/2020 10:02 AM) → Revision 6/7 (Per Amundsen, 02/18/2022 02:45 AM)
_Added in 1.9.0_ *$bytes(N,bkmgt3dp)* *$bytes(N,bkmgt3d)* Returns comma formatted file-size. _Supports "Big Integers":https://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic_ *Parameters* N - The number to format. b - Show N in bytes. k - Show N in kilobytes. m - Show N in megabytes. g - Show N in gigabytes. t - Show N in terabytes. 3 - Show in 3 digits format. d - *TODO* p - Show N in petabytes. *Properties* .suf - Appends the b, k, M, G, T suffixes to the result. *Example* <pre> ; Returns 1. //echo -ag $bytes(1024, k) ; Returns 1KB. //echo -ag $bytes(1024, k).suf </pre>