← Learn
Dangerous
mkfs.ext4 /dev/sdb1

linux · bash · Beginner

Creates a fresh filesystem on a partition, which discards whatever was already there. Formatting writes new metadata over the old, and the files that used to be indexed become unreachable immediately.

Signals to notice

  • mkfs replaces the filesystem rather than mounting it
  • the existing contents of /dev/sdb1 are not preserved

Think you can spot these under time pressure?

Start Training

More File System