US: +1 561 2500001/EU: +359 2 4925555 LiveChat
[email protected] Sign Up Login
ITLDC
  • [EN]
  • [EN]

Disk Usage 🧮 in Linux: Tools, Tips, and That One Mysterious 20GB Log File

Disk Usage 🧮 in Linux: Tools, Tips, and That One Mysterious 20GB Log File

Apr 24, 2025KovačUncategorized @uk, Новини

You’re running your awesome website, crunching data, hosting memes, or running your secret AI overlord project. Then bam! Your server politely informs you that your disk is full. Time to go hunting!

Good news: Linux (and macOS too, btw – shout out to our UNIX cousin) comes packed with tools to help you figure out what’s eating your precious NVMe space.

Let’s meet the usual suspects.


du – Disk Usage (a.k.a. “Where the heck is my space?!”)

Use this to find out how much space your folders are taking.

du -sh /var/*

The -s gives you a summary, the -h makes it human-readable (unless you like reading “4287432K” and pretending it’s normal). Add –max-depth=1 for broader directory scanning.

Example: du -h –max-depth=1 / Instant overview of what’s fattening your filesystem. Spoiler: It’s usually /var/log.


df – Disk Free (no, not “Download Festival”)

Want to see how much disk space is left on all mounted filesystems?

df -h

This command is your go-to for the “how much space do I have left?” panic check. Bonus: Works beautifully on your Mac too!


lsblk – List Block Devices

A fancier way to see your drives and partitions. Unlike df, this doesn’t show usage, but it gives you a clear view of device structure.

lsblk

Especially useful if you’re dealing with multiple volumes or attached storage. Want filesystem types?
lsblk -f Now you’re really flexing.


fdisk -l – Old School Drive Detective

Want a retro vibe? This command lists all disks and their partitions, straight from the 90s.

sudo fdisk -l

It’s like the lsblk of yesteryear, but still super handy for detecting drives and partitions. Warning: Requires root.


Bonus Round: find – The File Treasure Hunter

Need to find what’s really clogging your space? Try this:

find / -type f -size +20M -exec ls -lh {} \; | sort -k 5 -hr | head -n 10

Translation: Find all files bigger than 20MB, list them with sizes, sort by size, and show top 10. You’ll be amazed (and slightly horrified) at what you forgot to delete.


🧼 Before You Purge: A Word of Warning (From Experience 😅)

If you’re not a million percent sure what a file is, don’t delete it. Accidentally deleting system logs? Meh. Accidentally deleting your database? Oops. Accidentally nuking /etc? You better hope your support team loves puzzles.

If you’re hitting disk space limits, here’s a pro tip: upgrading your ITLDC NVMe/SSD VDS is quicker, safer, and cheaper than two cups of fancy coffee. Scaling up is literally a few clicks away, and we’ll keep your server happy and humming.


Final Thought 💡

Whether you’re managing a VDS, a bare metal beast, or just your MacBook, these tools are your best friends. Keep them close, keep your filesystem cleaner than your desktop, and remember: du is your new disk whisperer.

Happy sysadmining 💽

Tags: hints,  linux,  utilities
Related Posts
  • OpenSSH 10.0 Released – New Tricks for Your Trusted Terminal Buddy

  • Mastering the Art of Redirecting Chaos: Linux Shell I/O Redirection Explained

  • 💡 10 Steps to Take If Your Cloud Virtual Server Is Not Working

← OpenSSH 10.0 Released – New Tricks for Your Trusted Terminal Buddy
🛠️ Mission Complete: NL Datacenter Maintenance Report! →

US/APAC Support

ITLDC

PO Box #800054
Aventura
FL 33280
USA

+1 561 2500001

[email protected]

EU Support

Smart Industries LLC

187E Warm Springs Rd B218
Las Vegas
NV 89119
USA

+1 561 2500001

[email protected]

Services

  • SSD VDS
  • Dedicated Servers
  • Shared Hosting
  • Colocation
  • DDoS Protection
  • SSL Certificates
  • Backup Storage
  • Reselling

Support

  • Get Help
  • ITLDC Status
  • Looking Glass
  • Our SLA
  • Datacenters
  • FAQ & Knowledgebase
  • Data Security
  • Contact us

© Copyright 1995-2019 ITLDC Team. You can freely use or share information from this site with a hyperlink to the original page.