BM: Baca dalam Bahasa Melayu
World L4: Remote Kitchens
Disk space: df and du
You will learn: to see how full a disk is, find what fills it, and free space with care.
Checked with Linux (Debian 13) on 1 Nov 2026
The problem
You are you in /home/you. 1 things here. Services: cron running, ssh running, nginx running.
you@kedai:~$Folder ~
- kedai/ (folder)
drwxrwxr-xmenu
+ 3 hidden (ls -a)
Services
cronrunningstarts at bootsshrunningstarts at bootnginxrunningstarts at boot
The branch kitchen can’t save new orders. The storeroom is 98% full! What is filling it?
Watch
df -h shows every disk: size, used, free. -h means sizes people can read. Tap the main disk, the one at /.
Tap the disk mounted at /.
0 of 1 found
Try it
df says how full. disk usage: How full the storeroom is. df shows whole disks; du shows which folders are fat. says which shelves are fat. Look in /var/log, then inside the biggest folder.
You are you in /home/you. 1 things here. Services: cron running, ssh running, nginx running.
you@kedai:~$Folder ~
- kedai/ (folder)
drwxrwxr-xmenu
+ 3 hidden (ls -a)
Services
cronrunningstarts at bootsshrunningstarts at bootnginxrunningstarts at boot
Hint
-s gives one total per folder. -h gives readable sizes.Predict
du shows this. Which file is safe to delete?
17G /var/log/kedai/debug.log
46M /var/log/kedai/orders.logPick one answer.
Try it
Delete only debug.log. Then check df -h / again. There is no undo, so type the full path.
You are you in /home/you. 1 things here. Services: cron running, ssh running, nginx running.
you@kedai:~$Folder ~
- kedai/ (folder)
drwxrwxr-xmenu
+ 3 hidden (ls -a)
Services
cronrunningstarts at bootsshrunningstarts at bootnginxrunningstarts at boot
Check
Good habit or not?
Swipe right for good, left for needs work. Or use the buttons.
Look with du before you delete anything.
You did it!
You can now find what fills a disk and free space safely.
Go deeper (optional)
Real-world twist: a running program may still hold a deleted file open. Then the space returns only after a restart of that program. journalctl --vacuum-size=200M trims the journal. ncdu is a friendly du (sudo apt install ncdu). The full disk here is engine-only.
Real mission
df -hdu -sh ~/* | sort -h | tail -n 5
0 of 2 steps done · Your ticks are saved.
Bahasa Melayu
Dapur cawangan tak boleh simpan pesanan baharu. Stor sudah 98% penuh! Apa yang memenuhinya?
df -h tunjuk setiap cakera: saiz, terpakai, kosong. -h bermaksud saiz yang manusia boleh baca. Tekan cakera utama, yang di /.
df beritahu berapa penuh. du beritahu rak mana yang gemuk. Tengok dalam /var/log, kemudian dalam folder yang paling besar.
-s beri satu jumlah untuk setiap folder. -h beri saiz yang mudah dibaca.du tunjuk ini. Fail mana yang selamat dipadam?
17G /var/log/kedai/debug.log
46M /var/log/kedai/orders.log
Padam debug.log sahaja. Kemudian semak df -h / lagi. Tiada undo, jadi taip path penuh.
Tabiat baik atau tidak?
Kini anda boleh cari apa yang memenuhi cakera dan kosongkan ruang dengan selamat.
You finished this before. Practice is always welcome!
Official docs: GNU coreutils: df · GNU coreutils: du
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?