For testing purposes I have to generate a file of a certain size (to test an upload limit).
What is a command to create a file of a certain size on Linux?
For small files:
dd if=/dev/zero of=upload_test bs=file_size count=1
Where file_size is the size of your test file in bytes.
file_size
For big files:
dd if=/dev/zero of=upload_test bs=1M count=size_in_megabytes
1.4m articles
1.4m replys
5 comments
57.0k users