LinuxCommandLibrary

f3read

Verify data integrity written by f3write

TLDR

Validate a device by checking the files in a given directory

$ f3read [path/to/mount_point]
copy

SYNOPSIS

f3read [OPTIONS] [DIRECTORY]

PARAMETERS

--help
    Displays a help message with usage information and then exits.

--version
    Shows the version information of f3read and then exits.

--output FILENAME
    Redirects the standard output of the command to the specified FILENAME instead of displaying it on the console.

DIRECTORY
    The path to the directory containing the files written by f3write that need to be verified. If this argument is omitted, f3read defaults to the current working directory.

DESCRIPTION

f3read (Fight Flash Fraud) is a command-line utility designed to verify the integrity of data previously written to flash drives and memory cards, typically by its companion tool, f3write. Its primary purpose is to detect counterfeit flash storage devices that falsely report a larger capacity than they physically possess. These fraudulent drives often exhibit data loss or corruption once their true, smaller capacity is exceeded.

f3read operates by reading the test files created by f3write (which fills the device with known data patterns). It then compares the data read from the device against the expected patterns, identifying any discrepancies, corruptions, or misplaced blocks. The command provides a summary of read blocks, data errors, and the total time taken for the verification process, thereby confirming whether the device reliably stores data across its advertised capacity and helping users identify unreliable or fake storage media.

CAVEATS

  • f3read relies on files previously created by f3write. It cannot be used independently to generate test data or verify drives not prepared by f3write.
  • The verification process can be time-consuming, especially for high-capacity flash drives, as it involves reading all written data.
  • Ensure f3write has completed successfully before running f3read; an incomplete f3write operation will lead to incorrect or misleading f3read results.

TYPICAL USAGE WORKFLOW

To effectively test a flash drive for its real capacity and integrity, a two-step process is typically followed:
1. Use f3write to completely fill the device with test data. For example: f3write /media/your_usb_drive
2. After f3write has successfully completed, run f3read on the same directory to verify the data: f3read /media/your_usb_drive
The output will indicate if any data corruption or discrepancies occurred, which are strong indicators of a potentially fake or faulty drive.

INTERPRETING RESULTS

A truly reliable flash drive will result in a f3read output reporting zero data errors and zero misplaced blocks. If f3read reports any errors (e.g., 'data loss', 'misplaced blocks', or 'wrong data'), it signifies that the data written by f3write could not be read back correctly. This is a critical indicator of a problem with the flash drive's integrity or that its advertised capacity is fraudulent. Such errors are hallmarks of counterfeit devices that fail to store data reliably across their entire stated capacity.

HISTORY

f3read is an integral part of the f3 (Fight Flash Fraud) project, which emerged as a critical toolset to combat the pervasive issue of counterfeit USB flash drives and SD cards circulating in the market. These fraudulent devices are notorious for reporting inflated storage capacities while possessing significantly less physical memory, leading to data loss once their true limits are reached. The f3 utilities, including f3write and f3read, were developed to empower users with a reliable method to test and verify the actual storage capacity and data integrity of their flash media. The project quickly gained recognition as a practical and essential solution for consumers and professionals alike, helping them identify and avoid deceptive storage products and ensure the authenticity of their purchased devices.

SEE ALSO

f3write(1), f3probe(1), lsblk(8), df(1)

Copied to clipboard