← 返回命令列表

Linux command

f3write 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Fill a mounted flash drive

f3write [/media/flash_drive]

Write test files starting

f3write --start-at=[10] [/media/flash_drive]

Write test files up to

f3write --end-at=[50] [/media/flash_drive]

Write to a raw device

sudo f3write -g [/dev/sdX]

Force write even if

f3write --force [/media/flash_drive]

Optimize for low memory

f3write --low-memory [/media/flash_drive]

说明

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.

参数

--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.

FAQ

What is the f3write command used for?

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.

How do I run a basic f3write example?

Run `f3write [/media/flash_drive]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --start-at=_NUM_ do in f3write?

Initial number for file names (default: 1).