Timeline for How can I get the size of a file in a bash script?
Current License: CC BY-SA 3.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Nov 8, 2016 at 15:02 | comment | added | Stéphane Chazelas | For files of type directory, that gives the disk usage of the directory but also of all the other files within (recursively). | |
| Nov 8, 2016 at 15:01 | comment | added | Stéphane Chazelas | Note that standard du give an output in number of 512-byte units. GNU du uses kibibytes instead unless called with POSIXLY_CORRECT in its environment. | |
| Sep 17, 2015 at 5:10 | comment | added | Peter Lyons | This flavor of du prints out size in blocks of 1024 bytes, not a simple count of bytes. | |
| Jul 14, 2011 at 0:59 | history | migrated | from stackoverflow.com (revisions) | ||
| Jul 13, 2011 at 16:29 | comment | added | c00kiemon5ter | that or stat -c "%s" ;) | |
| Jul 13, 2011 at 16:25 | history | answered | Teddy | CC BY-SA 3.0 |