Devices, Linux Filesystems, Filesystem Hierarchy Standard Flashcards
fdisk
Used to partition a disk device
How many partitions can you have by default? (Without extended or logical partitions)
4
fdisk -n
Interactive mode
mkfs -t ext3 mydev
Makes mydev an ext3 file system
mkfs -c
Used to check the device for bad blocks before building the file system
mkswap
Turns a file system into swap
du
Used to estimate file space usage
du -c
Produce a grand total
du -h
Human readable
du –max-depth N
Print the total for a directory only if it is N or fewer levels below the command line argument
du -b
Makes output in bytes
dumpe2fs
Obtains file system info
mke2fs
equivalent of “mkfs -t ext2/3/4”
tune2fs
Allows you to change the file system parameters
Note: file system must be unmounted
fsck -A
Check all file systems in /etc/fstab
fsck -a
Attempt to automatically repair all errors
fsck -C
Display completion/progress
fsck -N
Don’t execute, just show what would happen
debugfs
Interactively modify a file system
mount -a
Causes all file systems in /etc/fstab to be mounted as indicated
mount -o
Override mount options in /etc/fstab when manually mounting partition
unmount -f
Forcibly unmount a filesystem
/etc/fstab
Configuration file containing persistent file system mounts (for mounting on boot)
quotaon
Turns quotas on
edquota
Edit a quota