LinuxCommandLibrary

f3write

flash drive capacity tester

TLDR

Fill a mounted flash drive with test files

$ f3write [/media/flash_drive]
copy
Write test files starting from a specific file number
$ f3write --start-at=[10] [/media/flash_drive]
copy
Write test files up to a specific file number
$ f3write --end-at=[50] [/media/flash_drive]
copy
Write to a raw device (unmounted)
$ sudo f3write -g [/dev/sdX]
copy
Force write even if device appears busy
$ f3write --force [/media/flash_drive]
copy
Optimize for low memory systems
$ f3write --low-memory [/media/flash_drive]
copy

SYNOPSIS

f3write [--start-at=NUM] [--end-at=NUM] PATH

DESCRIPTION

f3write is part of the F3 (Fight Flash Fraud) suite and tests the actual capacity of flash storage devices by filling them with known data patterns. It writes 1GB files named N.h2w (where N is a number) to the target filesystem until the drive is full.
The typical workflow involves writing test data with f3write, then verifying with f3read. If the drive is counterfeit and reports false capacity, f3read will detect data corruption beyond the actual physical capacity.
f3write can operate on a mounted filesystem (writing to a directory) or directly to a raw unmounted device using the -g option.

PARAMETERS

--start-at=NUM

Initial number for file names (default: 1).
--end-at=NUM
Final number for file names (default: infinity).
-a, --append
Append new files to existing ones on the target device.
-b BYTES, --block-size=BYTES
Set I/O block size in bytes (default: 1M).
-f, --force
Force writing even if device appears busy or contains data.
-g, --full-device
Write to the full raw device (device must be unmounted).
-L, --low-memory
Optimize operation for systems with limited memory.
-s OFFSET, --start-offset=OFFSET
Starting offset in bytes from device beginning.
-S OFFSET, --end-offset=OFFSET
Ending offset in bytes where writing should stop.

CAVEATS

All data on the tested disk will be overwritten. Always backup important data before testing. When using raw device mode (-g), ensure you specify the correct device to avoid destroying data on other drives. The test can take considerable time depending on drive size and speed.

HISTORY

f3write was created by Michel Machado as part of the F3 (Fight Flash Fraud) suite. The tool addresses the widespread problem of counterfeit flash storage that uses modified firmware to report inflated capacities. When users attempt to store more data than the actual capacity, the drive silently corrupts data by overwriting existing content or simply discarding writes.

SEE ALSO

f3read(1), f3probe(1), f3fix(1), dd(1)

> TERMINAL_GEAR

Curated for the Linux community

BOSGAME Mini PC N95, Intel 12th Mini Computers| 16GB DDR4 RAM| 512GB M.2 2280 SSD| 4K 60HZ Triple Displays by Dual HDMI+Type-C, 6W TDP Quiet Mini PC, WIFI5, BT 5.0 Office

BOSGAME Mini PC N95, Intel 12th Mini Computers| 16GB DDR4 RAM| 512GB M.2 2280 SSD| 4K 60HZ Triple Displays by Dual HDMI+Type-C, 6W TDP Quiet Mini PC, WIFI5, BT 5.0 Office

$239.99
New Raspberry Pi 3 Model B+ Board Raspberry PI 3B+

New Raspberry Pi 3 Model B+ Board Raspberry PI 3B+

$54.00
KIWITATA 2X Classic SNES USB Controller for PC Gamings, Retro SNES Wired USB Game Emulator Controller for Windows XP 7 8 11 Mac Raspberry Pi

KIWITATA 2X Classic SNES USB Controller for PC Gamings, Retro SNES Wired USB Game Emulator Controller for Windows XP 7 8 11 Mac Raspberry Pi

$16.99
Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community

Bmax Mini PC B2 Power Intel 5205U 8GB DDR4 256GB M.2 NVMe SSD ,HDMI 1.4&DP 1.2, USB3.2,4K Dual Display 2.4G/5G WiFi & BT5.0 Mini Desktop Computers /Office/Design

Bmax Mini PC B2 Power Intel 5205U 8GB DDR4 256GB M.2 NVMe SSD ,HDMI 1.4&DP 1.2, USB3.2,4K Dual Display 2.4G/5G WiFi & BT5.0 Mini Desktop Computers /Office/Design

$169.99
New Raspberry Pi 3 Model B+ Board Raspberry PI 3B+

New Raspberry Pi 3 Model B+ Board Raspberry PI 3B+

$54.00
Lenovo Gen 13 ThinkPad X1 Carbon Touchscreen Laptop with Intel Ultra 7 265U Processor, 14" WUXGA 100% sRGB, 32GB DDR5 RAM, 1TB NVMe Performance SSD, FHD+ IR+ RGB Camera, and Windows 11 Pro

Lenovo Gen 13 ThinkPad X1 Carbon Touchscreen Laptop with Intel Ultra 7 265U Processor, 14" WUXGA 100% sRGB, 32GB DDR5 RAM, 1TB NVMe Performance SSD, FHD+ IR+ RGB Camera, and Windows 11 Pro

$1,589.00