Friday, May 10, 2024
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 2083  / 3 Years ago, sat, june 26, 2021, 9:39:34

Output of



sudo df -h


is



Filesystem                                              Size  Used Avail Use% Mounted on
rootfs 9.2G 5.7G 3.1G 65% /
udev 10M 0 10M 0% /dev
tmpfs 357M 720K 356M 1% /run
/dev/disk/by-uuid/13605893-3936-4fd6-a7f5-e249f16c3f72 9.2G 5.7G 3.1G 65% /
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 2.2G 2.5M 2.2G 1% /run/shm
/dev/sda6

278G 12G 252G 5% /home


whereas



sudo du -sh /dev/sd*


gives



0   /dev/sda
0 /dev/sda1
0 /dev/sda2
0 /dev/sda5
0 /dev/sda6


o_O


More From » command-line

 Answers
7

Your raw devices are listed in /dev/, but that's not where the file system lives. Once the device is mounted it's available in the mount point, as listed in the "Mounted on" column.



You should run du on or somewhere in a mount point to count the usage on the file system. E.g.:



sudo du -sh /home


What you were doing is asking how much space the device listing is using in the virtual file system /dev. This is nothing, as it's purely virtual.


[#27709] Sunday, June 27, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
nsuainner

Total Points: 141
Total Questions: 102
Total Answers: 109

Location: Maldives
Member since Sat, Jan 29, 2022
2 Years ago
nsuainner questions
Sat, Oct 22, 22, 22:47, 2 Years ago
Sun, Oct 2, 22, 12:53, 2 Years ago
Tue, May 31, 22, 05:35, 2 Years ago
;