head.daveops.net

Snippets for yer computer needs

Mount

# Mounting an ISO
mount -o loop disk1.iso /mnt/disk

# Remount a filesystem (change options without unmounting)
mount /home -o remount, noatime

# Create a RAM disk
mount -t tmpfs tmpfs /mnt -o size=1024m

Lazy unmount of a partition

Linux 2.4.11+

umount -l <mount>

fuser

# See what processes are using /mnt
fuser -v /mnt

# Kill processes using /mnt
fuser -k -KILL /mnt

UUID

# find a filesystem
findfs UUID=...
# list filesystems
blkid