disk
Disk usage and storage
-
blkid
Tested blkid examples: reading a filesystem's UUID, label and type, single-value output for scripts, searching by tag, and probing past the cache.
-
dd
Tested dd examples: making disk images, choosing a block size, seek and skip, conv=notrunc, sparse files, and why the output argument is the dangerous one.
-
df
Tested df examples: reading the output, asking about the filesystem a path is on, choosing columns and units, and the full disk that still reports free space.
-
du
Tested du examples: -sh totals, --max-depth, apparent size versus allocated blocks, sparse files, hard links, excludes, and sorting the output.
-
fsck
Tested fsck examples: checking without repairing, forcing a check past the clean flag, reading the exit status, and repairing a damaged filesystem.
-
lsof
Tested lsof examples: what has a file open, which process holds a port, finding a deleted file that is still using disk space, and narrowing the output.
-
mkfs
Tested mkfs examples: making an ext4 filesystem, setting a label and UUID, choosing block and inode counts, and checks before formatting.
-
mount
Tested mount examples: attaching a filesystem by device, label or UUID, reading the options in force, bind mounts, fstab, and busy unmounts.
-
Find the largest files on disk
Locate what is eating your disk space, from a whole filesystem down to one directory.
-
No space left on device
A write failed for want of space. Find which filesystem is full, whether it ran out of blocks or inodes, and why deleting the big file often frees no space.
-
Hard links vs symbolic links
A hard link is another name for the same data, a symlink a small file holding a path. What that means when the original goes, when sed edits it, and on disk.