World map

 

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 are hereyou@kedai:~$

Folder ~

  • kedai/ (folder)drwxrwxr-xmenu

+ 3 hidden (ls -a)

Services

  • cronrunningstarts at boot
  • sshrunningstarts at boot
  • nginxrunningstarts 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 are hereyou@kedai:~$

Folder ~

  • kedai/ (folder)drwxrwxr-xmenu

+ 3 hidden (ls -a)

Services

  • cronrunningstarts at boot
  • sshrunningstarts at boot
  • nginxrunningstarts at boot

Predict

du shows this. Which file is safe to delete?

17G	/var/log/kedai/debug.log
46M	/var/log/kedai/orders.log

Pick 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 are hereyou@kedai:~$

Folder ~

  • kedai/ (folder)drwxrwxr-xmenu

+ 3 hidden (ls -a)

Services

  • cronrunningstarts at boot
  • sshrunningstarts at boot
  • nginxrunningstarts at boot

Check

Good habit or not?

Swipe right for good, left for needs work. Or use the buttons.

1 / 3

Look with du before you delete anything.

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

  1. df -h
  2. du -sh ~/* | sort -h | tail -n 5

0 of 2 steps done · Your ticks are saved.