All tags
disk
Narrow down
Shell51
- Tip
sudo nvme smart-log /dev/nvme0Nvme smart-log shows how worn out your NVMe drive isReads wear, temperature and error counters straight from an NVMe drive.3 Dec 2026 - 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
sudo smartctl -a --json /dev/sda | jq '.smart_status.passed'Smartctl --json turns disk health into data a script can readPrints SMART data as JSON, so scripts can check pass or fail, temperature and hours with jq.3 Dec 2026 - Tip
sudo hdparm -I /dev/sdaHdparm -I reads the identify data straight from a driveAsks the drive itself for detailed identification and feature data, not the kernel's boot-time copy.2 Dec 2026 - Tip
sudo apt install fioFio measures the random read performance of a disk with a test fileTest small random reads, which feel closer to real use than big copies.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
Storage=volatileStorage=volatile keeps the journalctl log in RAM onlyStop journald from writing logs to an SD card or other fragile storage.30 Nov 2026 - Tip
sudo journalctl --rotateJournalctl rotate makes vacuum delete the current file tooArchive the active journal file first so a cleanup can actually remove its data.30 Nov 2026 - Tip
sudo hdparm -C /dev/sdXHdparm -C asks a disk if it's asleep without waking itShows whether a hard disk is spinning or in standby, for checking spin down settings.30 Nov 2026 - Tip
watch -n 1 "grep -E '^(Dirty|Writeback):' /proc/meminfo"Dirty and Writeback in /proc/meminfo show how much data Linux still has to write to diskKnow when a copy has really reached the disk before you pull a USB drive.30 Nov 2026 - Tip
sudo apt-get -s autocleanapt-get autoclean keeps the cache but drops .deb files that are out of dateRemoves only cached package files that can no longer be downloaded.30 Nov 2026 - Tip
sudo dmesg -wTDmesg -w shows the name a disk gets when you plug it inWatches kernel messages live, so you see the device name and any errors of a disk you connect.30 Nov 2026 - Tip
sudo journalctl --relinquish-varJournalctl relinquish-var lets you unmount /var without losing logsMake journald stop writing to /var so the disk can be unmounted cleanly.30 Nov 2026 - Tip
sudo tee /etc/systemd/journald.conf.d/50-filesize.conf <<'EOF'SystemMaxFileSize in journald.conf decides how much journalctl vacuum frees at onceControl the size of each journal file, and with it how coarse cleanups are.30 Nov 2026 - Tip
sudo du -xh -d1 / | sort -hdu -x stays on one filesystem so a mounted disk does not skew the totalTotals folder sizes without crossing into other mounted filesystems.28 Nov 2026 - Tip
sudo du --inodes -x -d2 /var | sort -n | taildu --inodes shows which folder uses up all your inodesCounts files per directory instead of bytes, to find what exhausts the inodes.28 Nov 2026 - Tip
sudo fdesetup changerecovery -personalFdesetup changerecovery -personal makes a new FileVault recovery keyReplaces your FileVault recovery key with a new one when the old key may be exposed.28 Nov 2026 - Tip
hdiutil compact ~/Documents/Projects.sparsebundlehdiutil compact gives back the space a sparse bundle no longer usesShrinks a sparse bundle disk image after you deleted files inside it.28 Nov 2026 - Tip
tmutil listlocalsnapshots /tmutil listlocalsnapshots shows the Time Machine snapshots stored on your Mac itselfLists the hidden hourly Time Machine snapshots on your Mac's own disk.28 Nov 2026 - Tip
diskutil activitydiskutil activity shows live what happens to disks on your MacShows live when disks appear, mount, unmount or eject on your Mac.28 Nov 2026 - Tip
diskutil eject disk4diskutil eject takes every volume of a disk offline before you pull the cableUnmounts every volume on a disk and takes it offline, ready to unplug.28 Nov 2026 - Tip
diskutil info /diskutil info prints everything macOS knows about one disk or volumeShows the file system, identifier and space of any disk or volume on your Mac.28 Nov 2026 - Tip
192.168.1.x:/export/media /mnt/media nfs x-systemd.automount,x-systemd.idle-timeout=10min 0 0x-systemd.automount in fstab mounts a NAS share on first useMounts a network share only when a program opens the folder, so boot never waits for it.27 Nov 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 -o remount,noatime /mnt/dataNoatime stops Linux from writing a timestamp every time you read a fileStops the filesystem from updating access times on every read, which saves writes on data disks.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 sfdisk --dump /dev/sdX > sdX.dumpSfdisk --dump saves a disk's partition table to a text fileSaves the partition layout of a disk to a text file you can restore from later.27 Nov 2026 - Tip
sudo mkswap /swapfileMkswap and swapon add a swap file without repartitioningGives a Linux machine swap space from a plain file, without changing any partitions.27 Nov 2026 - Tip
sudo umount -l /mnt/nasUmount -l detaches a hung network share, but read the fine printFrees the mount point of a hung network share so the machine can shut down cleanly.27 Nov 2026 - Tip
sudo badblocks -sv /dev/sdXBadblocks -sv reads a whole disk to find bad blocks without writing to itReads every block of a disk and lists the ones that cannot be read, without writing.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 findmnt --verify --verboseFindmnt --verify checks fstab before a reboot can break the disk mountsChecks fstab for typos and missing devices without mounting anything.24 Nov 2026 - Tip
sudo mount -o remount,ro /mnt/dataMount -o remount,ro puts a disk read-only without unmounting itSwitches a mounted filesystem to read-only in place, so a failing disk stops receiving writes.24 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
udevadm info --query=property --name=/dev/sda | grep -E 'ID_MODEL=|ID_SERIAL_SHORT='udevadm info reads the serial number of a disk without opening the casePrints model and serial number of a drive from the udev database so you can identify it.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
snap list --all | awk '/disabled/{print $1, $3}' | while read name rev; do sudo snap remove "$name" --revision="$rev"; donesnap list --all reveals the old revisions you can removeFinds and removes inactive snap revisions that waste disk space.24 Nov 2026 - Tip
sudo apt cleanApt clean empties the cache of downloaded .deb filesDeletes cached package downloads to free disk space on the system.24 Nov 2026 - Tip
[Journal]SystemMaxUse in journald.conf.d keeps journalctl history within a size limitCaps the size and age of the stored journal permanently with a small config drop-in.24 Nov 2026 - Tip
sudo lsof +L1Lsof +L1 finds deleted files that still fill your diskLists deleted files that a running program still holds open, which is why df stays full.19 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 fstrim -avFstrim -av tells the SSD which blocks of the disk are freeTrims all mounted filesystems that support it, which keeps SSD write speed up.18 May 2026 - Tip
sudo hdparm -tT /dev/sdaHdparm -tT gives a quick read speed number for a diskMeasures how fast a disk reads sequentially, as a quick health and cabling check.18 May 2026 - Tip
sudo iotop -oPaIotop -oPa shows which program wrote the most to the diskLists the processes currently reading or writing the disk, with accumulated totals.17 May 2026 - Tip
sudo apt cleanApt clean removes the downloaded .deb files in /var/cache/apt/archivesDeletes the cached package files that apt keeps after each download to free disk space.8 Apr 2026 - Tip
sudo wipefs /dev/sdbWipefs lists the signatures on a disk before you erase any of themLists and removes old filesystem and RAID signatures from a disk, with a dry-run option.1 Feb 2026 - Tip
sudo dd if=debian.iso of=/dev/sdX bs=4M status=progress conv=fsyncDd status=progress shows a disk copy, and of= decides what you destroyCopies an image to a disk with live progress, and the target device decides what gets overwritten.1 Feb 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
Storage33
- 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
lsscsi -slsscsi -s lists your disks with their sizesLists SCSI-layer devices such as disks with capacity, in one line each.2 Dec 2026 - Tip
snap savedsnap removal keeps a copy of the app data unless you purge itSkip the automatic snapshot when you are sure the data can go.1 Dec 2026 - Tip
ls -lhS /var/logls -lhS puts the biggest files in a folder at the topSort a directory listing by size, with readable units.1 Dec 2026 - Tip
apt list '~c'apt purge '~c' removes the config leftovers of packages you already removedCleans out packages that are gone but still left their configuration behind.30 Nov 2026 - Tip
udisksctl power-off -b /dev/sdXudisksctl power-off makes a USB disk safe to unplugFlushes, detaches and powers down a USB disk from the terminal, like ejecting it in a file manager.30 Nov 2026 - Tip
du -sh -- .[!.]* * 2>/dev/null | sort -hdu -sh * skips hidden folders, and they can hold half your diskIncludes dot folders like .cache in a du overview, where the usual glob leaves them out.30 Nov 2026 - Tip
ls -l /dev/disk/by-id//dev/disk/by-id gives a disk a name that never changesUses a name based on model and serial number instead of sda or sdb, which can swap after a reboot.30 Nov 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
du -h -t 1G /srv | sort -hdu -t 1G shows only the folders that are bigger than a size you pickHide the hundreds of small folders and see only the ones worth cleaning up.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
du -ch /var/log/*.log | tail -n 1du -ch adds up the disk space of only the files you pickGives one total for a set of matching files, like all logs or all ISO images.30 Nov 2026 - Tip
du -sh --exclude=node_modules --exclude='*.iso' ~/projectsdu can leave whole patterns out of a disk usage totalMeasures a folder without the parts you don't care about, like ISO files or node_modules.30 Nov 2026 - Tip
cat /sys/block/sda/queue/scheduler/sys/block/sda/queue/scheduler shows and switches the Linux I/O scheduler of a diskSee which I/O scheduler a disk uses and try another one without a reboot.30 Nov 2026 - Tip
mount -o loop,ro backup.img /mnt/imgmount -o loop,ro opens a disk image or ISO without writing to itMounts an image file as a read-only folder, so you can copy files out of it safely.30 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
df -h --output=source,fstype,size,used,avail,pcent,targetdf --output picks exactly the columns you want, including inode usagePrints only the columns of df that you list, such as mount point, percentage and inode use.28 Nov 2026 - Tip
du -h -d1 --time --time-style=long-iso ~/Downloads | sort -hdu --time shows when each folder was last touchedAdds the date of the latest change to each folder in a du listing.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
UUID=<your-uuid> /mnt/backup ext4 noauto,user 0 0The user option in fstab lets you mount a disk without sudoLets a normal user mount and unmount one disk from fstab without root.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
maxsize 100Mmaxsize makes logrotate rotate a log early when it grows too fastRotate a log on its normal schedule and also as soon as it passes a size.27 Nov 2026 - Tip
truncate -s 10G test.imgdu --apparent-size explains why ls and du disagree about a fileShows the size a file claims to be next to the space it really uses on disk.27 Nov 2026 - Tip
lsblk -d -o NAME,SIZE,ROTA,MODELlsblk -d -o NAME,ROTA tells an SSD from a spinning diskShows with one column whether each drive is a spinning disk or flash storage.24 Nov 2026 - Tip
df -hTdf -hT shows the filesystem type next to every mountAdds a column with the filesystem type, so you see what is on each mounted disk.23 Nov 2026 - Tip
ncdu -x /ncdu shows what fills your disk and lets you delete from the same screenShows disk usage as a navigable list, biggest first, with delete built in.19 Nov 2026 - Tip
du -sh * 2>/dev/null | sort -hdu -sh * | sort -h shows what is eating your disk, biggest lastLists every folder in the current directory with its size, sorted so the biggest ones are at the bottom.18 Nov 2026 - Tip
smartctl -a /dev/sdX > /boot/smart_report.txtsmartctl can save a SMART report to the boot drive for the forumSaves a full SMART report of one disk to a file you can attach to a support post.19 Sep 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 - Tip
iostat -xz 1iostat -xz 1 shows how busy each disk is, once per secondPrints per-disk utilisation and wait times every second to show whether storage is the bottleneck.17 May 2026 - Tip
df -i /vardf -i shows a full disk that still has free gigabytesShows how many inodes are used on each filesystem, which explains a disk that is full with free space left.17 May 2026
Mac3
- Tip
fdesetup statusfdesetup status tells you in one line whether FileVault is onChecks from Terminal whether FileVault disk encryption is on and a recovery key exists.28 Nov 2026 - 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
Security1
Media1
Docker1
Nothing matches.