All tags
filesystems
Narrow down
Shell15
- Tip
sudo dumpe2fs -h /dev/sdb1dumpe2fs -h prints the ext4 superblock without the long group listShows the settings stored in an ext4 filesystem, such as features, state and block size, in one short screen.3 Dec 2026 - Tip
sudo e2freefrag /dev/sdb1e2freefrag shows how chopped up the free space on an ext4 disk isReports free space fragmentation on ext2, ext3 and ext4, with a histogram of free chunk sizes.3 Dec 2026 - Tip
UUID=1234-abcd /mnt/backup ext4 defaults,nofail,x-systemd.device-timeout=5s 0 2Nofail in fstab lets Linux finish booting when an extra disk is missingMarks an fstab mount as optional, so a missing disk no longer holds up the boot.3 Dec 2026 - Tip
sudo fsfreeze -f /srv/dataFsfreeze holds back writes on filesystems while you take a snapshotFlush and pause a mounted volume so a disk snapshot is consistent.1 Dec 2026 - Tip
sudo btrfs filesystem usage /mnt/poolBtrfs filesystem usage tells you the real free space on btrfs filesystemsSee allocated and unallocated space when df gives a misleading answer.1 Dec 2026 - Tip
sudo tune2fs -l /dev/sdX1 | grep -iE 'mount count|check'tune2fs can schedule a periodic check for ext4 filesystemsHave a data volume checked after a set time or number of mounts.1 Dec 2026 - Tip
sudo losetup -f -P -r --show sdcard.imgLosetup -P opens the partitions inside a disk imageMounts the partitions inside a full disk image file, such as an SD card backup.27 Nov 2026 - Tip
sudo mount --bind /mnt/data/media /srv/mediaMount --bind makes a folder show up in a second placeShows the same folder at a second path, which works where a symlink does not.27 Nov 2026 - Tip
sudo parted -s -a optimal /dev/sdX mklabel gpt mkpart data ext4 1MiB 100%Parted -s partitions a new disk in one aligned lineCreates a GPT partition table and one aligned partition on a new disk in a single command.27 Nov 2026 - Tip
sudo e2fsck -fn /dev/sdb1e2fsck -n checks an ext4 filesystem without changing anythingChecks an ext4 filesystem for errors and only reports them, without repairing anything.27 Nov 2026 - Tip
sudo mount -o uid=1000,gid=1000,fmask=0133,dmask=0022 /dev/sdb1 /mnt/usbChmod does nothing on a FAT USB stick, set uid and umask when you mount itMakes a FAT-formatted USB drive writable for your own user with mount options.27 Nov 2026 - Tip
sudo parted /dev/sdb unit GiB print freeParted print free shows the unused space on a diskLists partitions together with the unallocated gaps between them, in readable units.24 Nov 2026 - Tip
sudo blkid /dev/sdb1Blkid prints the UUID to use in fstab for a diskPrints the stable UUID and filesystem type of a partition so fstab does not depend on changing device names.24 Nov 2026 - Tip
sudo du -h -d1 -x /var | sort -hdu -h -d1 | sort -h finds what is eating your diskLists directory sizes with the biggest last, so you see what fills the disk.17 Jul 2026 - Tip
sudo tune2fs -m 1 /dev/sdb1tune2fs -m 1 gives back the reserved space on a large data diskLowers the share of an ext4 disk that is reserved for root, so you get the space back.1 Feb 2026
Storage13
- Tip
zfs get compressratio tank/mediazfs get compressratio shows how much space compression savesSee how much disk space ZFS compression saves per dataset.3 Dec 2026 - Tip
zpool status -xzpool status -x only reports ZFS pools that have a problemHides healthy pools and shows only those with errors or that are unavailable, which suits a quick check.3 Dec 2026 - Tip
filefrag /var/lib/libvirt/images/vm1.qcow2filefrag shows how fragmented a file is on Linux filesystemsCount the pieces a large file is split into on disk.1 Dec 2026 - Tip
Settings > Disk Settings > Default file systemCheck the default file system before you format a new array driveMakes sure a new data drive gets the file system you meant to use.1 Dec 2026 - Tip
e2label /dev/sdX1 backup2e2label gives an ext4 disk a name you can mount it bySets a readable label on an ext4 filesystem and uses that label in fstab.30 Nov 2026 - Tip
stat -f /srvstat -f shows block size and free inodes of the disk under a pathPrints filesystem details like type, block size and free inodes for any folder.30 Nov 2026 - Tip
resize2fs /dev/sdX1resize2fs makes an ext4 filesystem use a disk you just made biggerGrows an ext4 filesystem to fill its enlarged disk or partition, often while it stays mounted.30 Nov 2026 - Tip
if ! mountpoint -q /mnt/backup; thenMountpoint -q tells a script whether a folder is really mountedReturns success only when a folder is a mount point, so scripts can check first.28 Nov 2026 - Tip
findmnt --dffindmnt --df gives you df output without the pseudo filesystemsShow mounted filesystems in a df-style table, minus the pseudo filesystems.28 Nov 2026 - Tip
UUID=<root-uuid> / ext4 defaults 0 1The last number on an fstab line decides whether fsck checks that diskExplains the sixth fstab column, which decides whether a disk gets a filesystem check at boot.27 Nov 2026 - Tip
cp --reflink=always vdisk1.img vdisk1-before-update.imgcp --reflink=always makes an instant copy on Btrfs and XFS, or failsClones a big file in an instant on filesystems that support copy on write.27 Nov 2026 - Tip
chkdsk C: /scanchkdsk C: /scan checks a Windows disk while you keep workingScans an NTFS drive for errors online, without locking it or restarting first.26 Nov 2026 - Tip
lsblk -flsblk -f shows filesystems, labels and UUIDs in one viewShows every disk and partition with its filesystem type, label, UUID and mount point.25 Jul 2026
Other tips6
- Tip
findmnt --pollfindmnt --poll prints a line every time something is mounted or unmountedWatches the mount table and prints each mount, umount, remount or move as it happens.3 Dec 2026 - Tip
find /srv -xdev -samefile /srv/downloads/movie.mkvfind -samefile lists every hard link to the same fileShows all the names a file has on disk, so you know what still keeps it alive.30 Nov 2026 - Tip
find / -xdev -lname '/mnt/olddisk/*' -ls 2>/dev/nullfind -lname finds symlinks by where they pointLists the symbolic links that point to a certain path, for example before you move a folder.30 Nov 2026 - Tip
mount -t tmpfs -o size=512M,mode=1777 tmpfs /mnt/scratchmount -t tmpfs -o size= gives you a folder that lives in RAM on LinuxCreate a fast scratch folder in memory with a hard size cap.30 Nov 2026 - Tip
find -L /srv/media -name '*.mkv'find -L follows symlinked folders that find normally skipsMakes find search inside folders that are reached through symbolic links.30 Nov 2026 - Tip
find /srv/share -type f -atime +365find -atime is often wrong, because Linux barely updates access timesShows why searching for files nobody read lately with find gives misleading results.30 Nov 2026
Mac2
- Tip
diskutil apfs addVolume disk5 APFS Scratch -quota 50gdiskutil apfs addVolume -quota adds a capped APFS volume without repartitioningAdds an extra APFS volume with a size limit, without partitioning the disk.28 Nov 2026 - Tip
diskutil eraseDisk ExFAT SHARED MBR disk4diskutil eraseDisk ExFAT formats a USB drive that Mac and Windows can both useFormats a USB drive as ExFAT so it works on both a Mac and Windows.28 Nov 2026
Docker2
- Tip
diskutil apfs listdiskutil apfs list shows how the APFS containers and volumes on your Mac fit togetherPrints your APFS containers with their volumes, so you see which ones share space.28 Nov 2026 - Tip
findmnt -T /var/lib/dockerfindmnt -T tells you which mount a path lives onPrints which mounted filesystem a given path lives on.6 Aug 2026
Nothing matches.