![Forrest logo](/images/logo.png)
dd:tldr:207f8
dd: Benchmark the write performance of a disk.
$ dd if=/dev/zero of=${filename_1GB} bs=${1024} count=${1000000}
try on your machine
This command uses the dd
command in Linux to create a file filled with zeroes.
if=/dev/zero
specifies the input file as/dev/zero
, which is a special file that produces null bytes when read.of=${filename_1GB}
specifies the output file name.${filename_1GB}
is a variable that should be replaced with the desired file name.bs=${1024}
sets the block size to 1024 bytes. This means thatdd
will write and read data in chunks of 1024 bytes at a time.count=${1000000}
specifies the number of blocks to be copied. Thecount
parameter, along with the block size, determines the overall size of the file. In this case, it will create a file of 1GB (1024 bytes x 1000000 blocks).
So, when you execute this command, it will generate a file named ${filename_1GB}
filled with 1GB of zeroes.
This explanation was created by an AI. In most cases those are correct. But please always be careful and
never run a command you are not sure if it is safe.