Linux Filesystem Commands

EXT4 mkfs.ext4 [-L LABEL -U UUID] /dev/XXX # format partition with ext4 tune2fs -l /dev/XXX # get information about partition e2fsck /dev/XXX # check fs and repair it resize2fs /dev/XXX [size] # grow ext4 fs # shrink ext fs (should be unmounted) e2fsck -f /dev/XXX resize2fs /dev/XXX size # shrink to minimum size e2fsck -f /dev/XXX resize2fs -M /dev/XXX size e4defrag -v /dev/XXX # Defragment tune2fs -L NEWLABEL /dev/XXX # Change ext4 label tune2fs -U UUID /dev/XXX # Change UUID (should be unmounted) tune2fs -m PERCENTAGE /dev/XXX # Resize reserved area BTRFS mkfs....

April 24, 2022 · 3 min · Iduoad