Linux dd command to test the read/write speed of the USB flash drive and the dd read/write speed
1. Brief description of the dd command:
If = input file, of = output file, ibs = number of bytes read at a time, obs = number of bytes written at a time, bs = set the number of bytes read and write at a time, skip = number of bs skipped, count = number of copies
2. Use/dev/null and/dev/zero
1. Think of/dev/null as a "black hole". It is equivalent to writing only files, and all the content written to it will be lost forever.
2./dev/zero is a pseudo file, but it actually produces continuous null streams.
3. Test the read/write speed of the USB flash drive.
# Switch to the USB flash drive directory to test the write speed
# Dd if =/dev/zero of =./largefile bs = 8 k count = 10000
10000 + 0 records in
10000 + 0 records out
81920000 bytes (82 MB) copied, 11.0626 s, 7.4 MB/s
# Test read speed (clear cache)
# Sudo sh-c "sync & echo 3>/proc/sys/vm/drop_caches"
# Dd if =./largefile of =/dev/null bs = 8 k
8000 + 0 records in
8000 + 0 records out
65536000 bytes (66 MB) copied, 2.90366 s, 22.6 MB/s
Source: Internet