0

I am trying to check my disk usage, because my root volume is full. I'm on Centos 7.5.

I thought that giving du the -x flag gets it to ignore mounted volumes.

But when I check my disk usage on this centos box I get this output:

[root@bc1 /]# du -skx * | sort -nr | head -10
du: cannot access ‘proc/24813/task/24813/fd/3’: No such file or directory
du: cannot access ‘proc/24813/task/24813/fdinfo/3’: No such file or directory
du: cannot access ‘proc/24813/fd/3’: No such file or directory
du: cannot access ‘proc/24813/fdinfo/3’: No such file or directory
207749412       data
61255660        home
1114652 usr
177732  var
138592  boot
124312  root
52112   run
34276   etc
52      tmp
0       sys

But the /data partition is mounted from another volume. And I want to exclude it.

[root@bc1 /]# df -h /data
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda        246G  199G   36G  85% /data

Why is the -x flag to du not excluding this volume? And how do I get du to show me only the root volume?

  • Why not just use df to see which partitions are full/empty? – Xen2050 Sep 18 '18 at 2:34
  • I'm using du because I want to find the things I can delete so clear up some space. I'm not just trying to find out how much space is used. What's the best way I can find the things I can delete to clear up space? – user99201 Sep 18 '18 at 3:25
  • If you've got a GUI I'd try baobab too/instead – Xen2050 Sep 27 '18 at 23:47
1

When you're in / and use the asterisk in du -skx * you're specifically asking du to look in data.

echo * should clarify what the asterisk is doing.

Try du -skx / instead.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.