Disk Management
Disk
Show Space Management
# Showall disks, usage, and format type
sudo df -T -h
ilesystemFilesystem Type Size Used Avail Use% Mounted on
udev devtmpfs 930M 4.0K 930M 1% /dev
tmpfs tmpfs 191M 1.5M 190M 1% /run
/dev/sda1 fuseblk 29G 25G 4.5G 85% /isodevice
/dev/loop0 iso9660 1.6G 1.6G 0 100% /cdrom
/dev/loop1 squashfs 1.5G 1.5G 0 100% /rofs
/cow overlay 22G 17G 4.1G 81% /
tmpfs tmpfs 954M 5.2M 949M 1% /dev/shm
tmpfs tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs tmpfs 954M 0 954M 0% /sys/fs/cgroup
tmpfs tmpfs 954M 56K 954M 1% /tmp
tmpfs tmpfs 191M 8.0K 191M 1% /run/user/999
tmpfs tmpfs 191M 20K 191M 1% /run/user/70000
google-drive-ocamlfuse fuse.google-drive-ocamlfuse 15G 9.1G 6.0G 61% /home/kapper/gdrive
# Check /var directories for disk usage, sort and limit results to 10
sudo du -ah /var | sort -nr | head -n 10
924K /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_disco-updates_universe_i18n_Translation-en
924K /var/cache/apparmor/26b63962.0/usr.lib.libreoffice.program.soffice.bin
912K /var/lib/texmf/web2c/pdftex/pdflatex.fmt
912K /var/lib/texmf/web2c/pdftex/latex.fmt
888K /var/cache/apt/archives/libgtkmm-3.0-1v5_3.24.0-2_amd64.deb
852K /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_disco-security_main_i18n_Translation-en
828K /var/lib/app-info/icons/ubuntu-disco-multiverse
824K /var/lib/dpkg/info/linux-headers-5.0.0-38-generic.md5sums
817K /var/lib/dpkg/info/linux-headers-5.0.0-13-generic.md5sums
804K /var/log/syslog.3.gz
#
#
#
# Scan this disk for usage, sort the results by directories > 1.0GB0GB, show largest 5 results
sudo du -xh / | grep '^\S*[0-9\.]\+G' | sort -rn | head -n 5
19G /
9.8G /home/kapper
9.8G /home
6.7G /usr
5.7G /home/kapper/.cache
4.3G /home/kapper/.cache/vscode-cpptools/ipch
4.3G /home/kapper/.cache/vscode-cpptools
3.6G /usr/lib
2.5G /home/kapper/.local
2.3G /home/kapper/.local/share
2.2G /usr/share
1.7G /var
1.5G /home/kapper/.local/share/Steam
1.3G /usr/lib/x86_64-linux-gnu
# Show the 10 files consuming the most data on this system
find / -printf '%s %p\n'| sort -nr | head -10
140737477885952 /proc/kcore
24244125696 /isodevice/casper-rw
3296907264 /media/lubuntu/37aba99c-8b85-4ddc-92eb-6f50251041e8/encrypted.block
1890263040 /media/lubuntu/37aba99c-8b85-4ddc-92eb-6f50251041e8/home/.shadow/362074638d2508061facd43743c9f08ff66866b8/mount/ASTjdxE5eNzc0F3lkW870B/4HICtmqSNBNCh4oi+U7116prbiG
1657700352 /isodevice/lubuntu-19.04-desktop-amd64.iso
1589342208 /cdrom/casper/filesystem.squashfs
471728128 /media/lubuntu/37aba99c-8b85-4ddc-92eb-6f50251041e8/home/.shadow/362074638d2508061facd43743c9f08ff66866b8/mount/ASTjdxE5eNzc0F3lkW870B/MK3nlrbwT+ZzY8n1fczEqB/Yqt2q,akFt0uJ7WDNJaHdNA0GbkTnhX7kza2zeVnGMI/E1hEyvd6NZ1+JT6hgxI2zA/JekSpYOtLWQPV0kgorVJuFbCcIG/LRriMSOWaunntY7RsNUiUC/x+gYqqpRFtEjXG+JzztvwlQ4LDeq82QY
268435456 /sys/devices/pci0000:00/0000:00:02.0/resource2_wc
268435456 /sys/devices/pci0000:00/0000:00:02.0/resource2
137797651 /home/kapper/.local/share/Steam/ubuntu12_64/libcef.so
# Show the toplargest 105 files consuming data on thisthe disksystem #(greater-than Also100MB), runusing lsblock onsize eachof file1MB.
to show more detailed informationsudo find / -xdev -type f -size +100M -exec ls -lal --block-size=M {} \; | sort -nk 5 -rw-r--r--r 1| root root 112110752 Mar 28 2019 /usr/lib/x86_64-linux-gnu/libQt5WebEngineCore.so.5.12.2head -rwxr-xr-xn 1 root root 113040384 Apr 1 06:54 /usr/share/code/code
-rwxr-xr-x 1 root root 115211472 Feb 24 15:16 /usr/share/discord/Discord
-rwxr-xr-x 1 root root 115420464 Feb 20 04:54 /opt/Mullvad VPN/mullvad-gui
-rw-rw-r-- 1 kapper kapper 120081829 Jan 20 22:32 /home/kapper/Downloads/go1.13.6.linux-amd64.tar.gz
-rwxr-xr-x 1 root root 120200624 Sep 30 2019 /opt/Bitwarden/bitwarden5
-rw-r--r-- 1 rootkapper rootkapper 120308248174M JanNov 830 09:4606:13 /usr/home/kapper/.local/share/JetBrains/Toolbox/apps/CLion/ch-0/213.5744.254/lib/firefox/libxul.soplatform-impl.jar
-rwxrwxr-xrw-r--r-- 1 kapper kapper 137797651174M DecNov 630 16:1203:14 /home/kapper/.local/share/Steam/ubuntu12_64/libcef.soJetBrains/Toolbox/apps/PyCharm-P/ch-0/213.5744.248/lib/platform-impl.jar
-rw-r--r-- 1 kapper kapper 174M Nov 27 05:41 /home/kapper/.local/share/JetBrains/Toolbox/apps/WebStorm/ch-0/213.5744.224/lib/platform-impl.jar
-rw-r--r-- 1 kapper kapper 174M Nov 23 11:21 /home/kapper/.local/share/JetBrains/Toolbox/apps/datagrip/ch-0/213.5744.178/lib/platform-impl.jar
-rw-r--r-- 1 kapper kapper 174M Dec 1 08:26 /home/kapper/.local/share/JetBrains/Toolbox/apps/Goland/ch-0/213.5744.269/lib/platform-impl.jar