<p>For testing purposes I have to generate a file of a certain size (to test an upload limit).  </p>

<p>What is a command to create a file of a certain size on Linux?</p>

Use this command:
```
dd if=$INPUT-FILE of=$OUTPUT-FILE bs=$BLOCK-SIZE count=$NUM-BLOCKS
```
To create a big (empty) file, set
```
$INPUT-FILE=/dev/zero
```
.
Total size of the file will be
```
$BLOCK-SIZE * $NUM-BLOCKS
```
.
New file created will be
```
$OUTPUT-FILE
```
.