If the wording of the question is wrong, please let me know. It might explain why I can’t find an answer.
I want to find the usage on my main disk using a command like:
du -sh /*
The problem is that I have a number of mount points at the root level, and I would like du
to skip these.
I thought the -x
option was supposed to do this, but either I misunderstand what it does or I’m using it the wrong way.
How can I apply du
to only the root disk without traversing the additional mounts?
Thanks
/bin
,/etc
, and other folders under/
, while excluding/run
,/proc/
,/sys
, and so on? – Miscreance/data
and/backup
and so on, but that’s basically correct. – Lifesavingdu
properly, the problem is that/*
is expanding to include every mount point under/
, thendu
iterates over each one, which defeats the-x
usage. The only way to solve this might be with a creative script. – Miscreance/*
with/
? Why would that not fix it and instead require a creative script? – Lysozyme/
would only show the sum total of/
. He wanted to see the subtotals for non-mounted folders. – Miscreancedf -h
. – Lysozyme