Skip to main content
added 29 characters in body; edited title
Source Link
rubo77
  • 30.6k
  • 46
  • 141
  • 217

How do I create Create a test file with lots of zero bytes

I know how to create an empty file:

touch /var/tmp/nullbytes

but how can I create a 1MB file that only contains nullbytes on the commandline with bash?

How do I create a test file with lots of zero bytes

I know how to create an empty file:

touch /var/tmp/nullbytes

but how can I create a 1MB file that only contains nullbytes?

Create a test file with lots of zero bytes

I know how to create an empty file:

touch /var/tmp/nullbytes

but how can I create a 1MB file that only contains nullbytes on the commandline with bash?

edited body
Source Link
rubo77
  • 30.6k
  • 46
  • 141
  • 217

I know how to create an empty file:

touch /var/tmp/nullbytes

but Howhow can I create a 1MB file that only contains nullbytes?

I know how to create an empty file:

touch /var/tmp/nullbytes

but How can I create a 1MB file that only contains nullbytes?

I know how to create an empty file:

touch /var/tmp/nullbytes

but how can I create a 1MB file that only contains nullbytes?

edited tags; edited tags
Link
Gilles 'SO- stop being evil'
  • 865.3k
  • 205
  • 1.8k
  • 2.3k
Tweeted twitter.com/#!/StackUnix/status/405325319877689345
Source Link
rubo77
  • 30.6k
  • 46
  • 141
  • 217
Loading