User Tools

Site Tools


linux:ubuntu_create_file_with_size

Create A File With A Certain Size

There are several options but the easiest ones would be either.

dd if=/dev/zero of=output.dat  bs=1G count=5

Or

dd if=/dev/zero of=output.dat  bs=5G  count=1

You can use (B)ytes, (M)egabytes, (G)igabytes etc.

linux/ubuntu_create_file_with_size.txt · Last modified: 24/11/2023 12:15 by Allan