Check Linux Disk Space and Find Large Files: A Beginner Guide
Before you begin
- Applies to:Linux with GNU df, du, find, and sort, plus lsblk from util-linux.
- Where to start:Open a Linux terminal with your regular account.
- What you need:Choose the folder you want to inspect. Large scans may take time. Press Ctrl+C to stop one.
Guide tools
When Linux says βNo space left on device,β first find out which storage area is full. You do not need to start by deleting files.
This guide explains available space, folder usage, large files, and mount locations. You need a Linux terminal and a normal user account. The commands are for inspection, so you can learn what the numbers mean before taking action.
df: filesystem β du: your folders β find: paths only β Plan before cleanup.
Check Space Available to Your Home Folder
Start Heredf reports space on a filesystem: the storage area holding your files. -h uses readable sizes such as G for gibibytes. $HOME selects your own home folder. Read the Avail and Use% columns.
df -h "$HOME"β― What to expect
Example only:Filesystem Size Used Avail Use% Mounted on/dev/sda2 98G 42G 51G 46% /Compare Your Home Folder with the System Root
Practice/ is the top of the Linux directory tree. The command displays storage information for both paths. If they share a filesystem, you may see the same underlying storage; do not add duplicate rows together. A nearly full root filesystem can affect services even when a separate home filesystem has plenty of room.
df -h / "$HOME"β― What to expect
Compare the Filesystem and Mounted on columns.The paths may share a filesystem or use separate filesystems.Measure How Much Space Your Own Files Use
Practicedu measures disk usage beneath a path. -s requests one total and -h makes it readable. This can take longer than df because du walks the folders it can access.
du -sh "$HOME"β― What to expect
Example:2.4G /home/samFind the Largest Immediate Folders
Practiceβmax-depth=1 prints the home total and its immediate folder totals. -x keeps the scan on the starting filesystem. The pipe | sends those lines to sort; -h understands size suffixes and -r sorts largest first. The home total is normally the first line, not an extra folder to delete.
du -h -x --max-depth=1 "$HOME" | sort -hrβ― What to expect
Example:2.4G /home/sam1.5G /home/sam/Downloads620M /home/sam/DocumentsThe actual names and sizes will differ.List Large Files Without Opening Them
Practicefind searches inside your home folder. -xdev avoids descending into other mounted filesystems, -type f selects regular files, and -size +100M selects files larger than 100 MiB. -print prints their paths; it does not remove them. A large file may be important, so identify it before deciding what to do.
find "$HOME" -xdev -type f -size +100M -printβ― What to expect
Paths to matching files, or no output if none match.A file such as /home/sam/Downloads/linux-installer.iso may appear.See Disks, Partitions, and Mount Locations
Practicelsblk lists block devices, such as disks and partitions. -o chooses columns: name, type, size, filesystem type, and mount locations. A mount location is where a filesystem appears in the directory tree. Observe the relationship; you do not need to change it.
lsblk -o NAME,TYPE,SIZE,FSTYPE,MOUNTPOINTSβ― What to expect
An indented tree of disks and partitions.A disk may contain several partitions; only some have mount locations.Virtual machines and WSL can show different device layouts.Check for Inode Exhaustion
VerifyA filesystem also needs records to track files, often called inodes. Many tiny files can exhaust these even when some data space remains. df -i displays inode totals; check IFree and IUse%. Some filesystems do not report conventional inode limits and may show zero or unavailable values.
df -i "$HOME"β― What to expect
Columns include Inodes, IUsed, IFree, and IUse%.If IFree is zero on a filesystem with a fixed inode pool, new files can fail.References and next steps
Your feedback keeps these production procedures accurate and battle-tested.