// blog / note

note

One-liner: find the biggest files in a directory

du -ah . | sort -rh | head -20 — dependable.

du -ah . | sort -rh | head -20

du -ah lists every file recursively with human sizes. sort -rh reverses by human-readable numeric size. head -20 grabs the top.

When the disk fills up at 11pm, this is the friend you want.

← back to all posts