I’m Kayla. I make videos, run small servers, and break things on my laptop more than I should. I need to know file sizes a lot. Like, “Why is my disk full again?” a lot. Here’s what I used on Linux to check file size, with real stuff from my day. What worked. What bugged me. And what I reach for now without thinking.
If you’d like a step-by-step walk-through of the exact commands I lean on, I wrote up a dedicated piece you can skim in two minutes: my companion guide to checking file size on Linux.
Need an even broader primer? The concise FAQ on file sizes over at Linux-Audit lays out several handy commands in one place.
The fast glance: ls -lh
When I’m in a folder and just need a quick look, I use this:
ls -lh
Real example from my Videos folder:
-rw-r--r-- 1 kayla kayla 1.9G Jun 2 14:10 skatepark_cut.mp4
-rw-r--r-- 1 kayla kayla 824M Jun 2 09:22 broll_take3.mov
-rw-r--r-- 1 kayla kayla 12M May 30 20:01 intro_music.wav
That “-h” flag shows human sizes. Easy on the eyes. It’s enough—until it’s not. It won’t sum folders. And I always have folders.
Whole folder check: du -sh
For folders, this is my go-to:
du -sh ~/Videos
My output last week:
54G /home/kayla/Videos
Then I wanted details. So I ran:
du -sh ~/Videos/*
Sample:
31G /home/kayla/Videos/client_A
18G /home/kayla/Videos/youtube_drafts
2.5G /home/kayla/Videos/stock
1.6G /home/kayla/Videos/misc
You know what? That alone saved me a full hour of guesswork. If you want a deeper dive into everyday Linux tricks, I share more over on Desktop Linux Reviews.
What I liked:
- Simple. Fast enough.
- Good “big picture” view.
What bugged me:
- On a huge folder tree, it can take time.
- It shows disk usage, not always exact bytes.
Exact bytes, no fluff: stat
Sometimes I need the exact byte count. No rounding. No “about.” I use:
stat --printf="%n: %s bytesn" intro_music.wav
My output:
intro_music.wav: 12582912 bytes
That’s 12,582,912 bytes. Clean and crisp. Great when I’m sending files and the client wants a hard number.
When I’m counting bytes in a stream: wc -c
If I’m piping data or I want a no-nonsense count:
wc -c < skatepark_cut.mp4
Output:
2040109465
That’s 2,040,109,465 bytes. I use this with scripts. It’s boring, but it never lies.
Hunting big files fast: find + size
When my disk screams for help, I hunt big files like this:
find ~/ -type f -size +500M -printf "%10s %pn" 2>/dev/null | sort -nr | head
One afternoon, this showed:
2147483648 /home/kayla/Videos/client_A/raw_dump.tar
2040109465 /home/kayla/Videos/skatepark_cut.mp4
1027604480 /home/kayla/.cache/chrome/Cache/data_17
838860800 /home/kayla/VMs/ubuntu_test.qcow2
I didn’t even know Chrome’s cache got that chunky. It did. I cleaned it. Felt great. If you enjoy “day-in-the-life” problem-solving stories, the whole chase is in this first-person tale of hunting down huge files on my Linux box.
Sorting the mess: top 20 biggest things
If I’m poking around one folder tree:
du -ah . | sort -h | tail -n 20
It’s noisy, but helpful. I use it inside a project folder. It shows both files and folders. Then I drill down where it hurts.
Quick truth about disk space: df -h
This one isn’t file size. It shows disk free space. Still, I use it daily:
df -h
My output after a big export:
Filesystem Size Used Avail Use% Mounted on
/dev/nvme0n1p3 474G 444G 12G 98% /
98%. Yikes. That’s how I know it’s time to clean house.
Sometimes the reason your storage spikes isn’t work footage at all—it can be the cache and media your social or dating apps stash away. If you’re curious about lightweight options that won’t litter your drive with gigabytes of video previews, take a peek at this curated list of free local sex apps—it spotlights services that keep the fun high and the storage footprint low. For folks specifically around Hernando County who'd rather open a quick webpage than juggle yet another heavyweight dating app, check out Backpage Spring Hill — the listings load fast, you can message matches right in the browser, and there's zero app cache to clog up your drive.
My secret weapon: ncdu (it’s a gem)
I love ncdu. If you’ve never played with it before, the short Wikipedia overview is a nice starting point. It’s a small, nerdy tool. But I swear by it.
Install:
- Ubuntu/Debian: sudo apt install ncdu
- Fedora: sudo dnf install ncdu
- Arch: sudo pacman -S ncdu
Run it in a folder:
ncdu ~/Videos
You get a simple screen with sizes. You can arrow around, press d to delete stuff (careful), and q to quit. One time it showed a forgotten folder named “client_A/render_cache” that was 11G. I removed it in seconds. Snack break victory.
What I liked:
- Fast.
- Easy to browse.
- Delete right there.
What bugged me:
- Terminal only. No pretty graphs. But I don’t mind.
GUI note (yes, I use it too)
On GNOME, I open Files, right-click a folder, and hit Properties. It shows size. But with many tiny files, it takes a while. The Disk Usage Analyzer app is fine too. Handy when I’m tired and don’t want to think.
Little gotchas I learned the hard way
- Sparse files: Some files, like VM images or databases, look huge but don’t use that much space. Try both:
- du -sh file.img
- du -sh –apparent-size file.img
- Permissions: If du shows “Permission denied,” add sudo. But think before you paste that.
- Network drives: Over VPN, du can feel slow. I run it inside the mount point, not on my whole home.
Real sparse file example I made for a test:
fallocate -l 2G fake.img
du -sh fake.img
# Output: 0B fake.img
du -sh --apparent-size fake.img
# Output: 2.0G fake.img
Wild, right?
If you ever crack open a pile of zipped archives (I do it weekly), you can save some time by skimming my “I unzipped a bunch of files so you don’t have to sweat it” write-up here: no-sweat unzipping on Linux.
Remote servers, quick and simple
I check logs on a small server I run:
ssh kayla@myserver "sudo du -sh /var/log/* 2>/dev/null | sort -h | tail"
One night, this showed:
1.1G /var/log/journal
512M /var/log/nginx
I trimmed logs, restarted, and got my Sunday back.
Real-world mini case: spring clean
I had 12 GB free. Needed 40 GB for a new edit. My steps:
- df -h (confirm problem)
- du -sh ~/Videos/* (find the hogs)
- ncdu ~/Videos (drill down and delete cache)
- find ~/ -type f -size +500M -printf "%10s %pn" | sort -nr | head (catch oddballs)
Results:
- Deleted old proxies: 9.4G
- Zipped a raw dump and moved it
