| -r | The type of media device to format. The only valid value is usb for a USB flash drive or other USB data storage device. |
| -d | The device to format. This value can be obtained from the lsmediadev command. |
| -t | The type of file system to format. Valid values are ext4 and vfat. If this option is omitted, the device will be formatted with the VFAT file system. |
| -l | The label to assign to the device. The specified label will be converted to upper case and truncated to 11 characters. If this option is omitted, a blank label will be assigned. |
| --help | Display the help text for this command and exit. |
formatmedia -r usb -d /dev/sdb1 -l BACKUP
Format a USB device with the EXT4 file system:
formatmedia -r usb -d /dev/sdb1 -t ext4 -l BACKUP
| None | |
| None | |
| Linux | FORMATMEDIA (1) | May 2022 |