I need to find out what's contributing to the disk usage on a specific filesystem (/dev/sda2):
$ df -h / Filesystem Size Used Avail Use% Mounted on /dev/sda2 96G 82G 9.9G 90% / I can't just do du -csh / because I have many other filesystems mounted underneath /, some of which are huge and slow:
$ df -h Filesystem Size Used Avail Use% Mounted on /dev/sda2 96G 82G 9.9G 90% / /dev/sdb1 5.2T 3.7T 1.3T 76% /disk3 /dev/sda1 99M 18M 76M 20% /boot tmpfs 16G 4.0K 16G 1% /dev/shm nfshome.XXX.net:/home/userA 5.3T 1.6T 3.5T 32% /home/userA nfshome.XXX.net:/home/userB 5.3T 1.6T 3.5T 32% /home/userB How can I retrieve disk usage only on /dev/sda2?
None of these work:
Attempt 1:
$ du -csh /dev/sda2 0 /dev/sda2 0 totalAttempt 2:
$ cd /dev/sda2/ cd: not a directory: /dev/sda2/
Usedcolumn give you what you are looking for?