Skip to main content
29 events
when toggle format what by license comment
S Dec 2, 2021 at 20:22 history edited Gilles 'SO- stop being evil' CC BY-SA 4.0
deleted 34 characters in body
S Dec 2, 2021 at 20:22 history suggested CraZ CC BY-SA 4.0
added `du -l` switch to include hard-linked files
Dec 2, 2021 at 20:03 review Suggested edits
S Dec 2, 2021 at 20:22
Apr 26, 2021 at 11:49 history edited Gilles 'SO- stop being evil' CC BY-SA 4.0
mention `ls -s` as well
Jan 8, 2019 at 19:50 comment added Mathieu de Lorimier This article from RedHat gives good options for RHEL/CentOS systems access.redhat.com/solutions/2316
Feb 20, 2018 at 9:41 history edited Stéphane Chazelas CC BY-SA 3.0
du does report indirect blocks, it reports disk usage. On most filesystems, it also reports blocks used to store some metadata like extended attributes
Jun 14, 2017 at 15:28 comment added fugitive This answer should go to Wikipedia :)
Apr 28, 2017 at 23:06 history edited Stéphane Chazelas CC BY-SA 3.0
GNU `du -P` still gives a number if 512-byte units with POSIXLY_CORRECT
Apr 13, 2017 at 12:37 history edited CommunityBot
replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
Feb 6, 2017 at 14:07 comment added Stéphane Chazelas du does account for indirect blocks. That's the main difference from the file size as reported by ls -l.
Nov 14, 2016 at 12:38 history edited Stéphane Chazelas CC BY-SA 3.0
added 129 characters in body
Mar 5, 2016 at 0:19 comment added jlliagre @comethapaxd'ajax Solaris Zones do not affect the way space is measured. However, datasets can be delegated to non global zones. In such case, they won't be able to see other datasets sharing the same pool and then won't have all the information needed to understand the underlying disk usage. Zones also often use lofs. This file system, not mentioned in Gilles's answer, is similar to Linux bind mounts. The issues with lofs is similar to the ones that can occur with network mounted file systems, and be even more complex when combined with ZFS, which is mandatory with modern Solaris releases.
Mar 4, 2016 at 22:32 history edited Stéphane Chazelas CC BY-SA 3.0
added loop device case.
Jul 25, 2015 at 23:04 history edited Gilles 'SO- stop being evil' CC BY-SA 3.0
mention lsblk
Mar 9, 2015 at 22:51 history edited Gilles 'SO- stop being evil' CC BY-SA 3.0
mention that the size of a directory isn't always deterministic (as noted by jilliagre in http://unix.stackexchange.com/a/189026)
Jan 16, 2015 at 23:01 history edited Gilles 'SO- stop being evil' CC BY-SA 3.0
added 309 characters in body
Apr 15, 2014 at 1:06 history edited Gilles 'SO- stop being evil' CC BY-SA 3.0
another case of df not reflecting the obvious data: NFS mounts
Apr 15, 2014 at 0:29 vote accept Gilles 'SO- stop being evil'
S Mar 26, 2014 at 19:34 history edited Gilles 'SO- stop being evil' CC BY-SA 3.0
Added information about open files consuming disk space even if they are not linked into any directory
S Mar 26, 2014 at 19:34 history suggested jrw32982 CC BY-SA 3.0
Added information about open files consuming disk space even if they are not linked into any directory
Mar 26, 2014 at 19:22 review Suggested edits
Mar 26, 2014 at 19:34
Mar 26, 2014 at 12:14 comment added Johan And the output from ls includes un-allocated (sparce file) blocks, but excludes allocated space at the end of the last block. du counts the allocated space in the final block twice when that block is shared by two files. Disk space is also reserved for bad-block management and SMART data, as well as for the partition table itself. File systems often doesn't start at the start of the partition because it can sometimes overlap boot loader code.
Mar 19, 2014 at 15:56 comment added Gilles 'SO- stop being evil' @illuminÉ That's too advanced Solaris for me, I don't know at what level it fits.
Mar 19, 2014 at 15:43 comment added user44370 You discussed snapshots. I was wondering if something like a Solaris container/zone affects the analysis of the space?
Mar 19, 2014 at 14:32 comment added Izkata I remember seeing a card catalog when I was like 6. I wonder how many won't know what they are?
Mar 19, 2014 at 10:52 comment added dotancohen I know that 'thank you' is discouraged in SE, but Gilles you deserve a huge 'Thank you' for this terrific post.
Mar 19, 2014 at 10:10 comment added Gilles 'SO- stop being evil' @Kiwy tune2fs requires having read access to the block device that contains the filesystem, which in general requires being root since that lets you read the content of any file.
Mar 19, 2014 at 9:37 comment added Kiwy does the use of tune2fs implies to be root ? I tried on a system on which I'm not root and no luck :-(
Mar 19, 2014 at 3:28 history answered Gilles 'SO- stop being evil' CC BY-SA 3.0