Generate dummy files in bash

后端 未结 8 879
面向向阳花
面向向阳花 2021-02-01 17:08

I\'d like to generate dummy files in bash. The content doesn\'t matter, if it was random it would be nice, but all the same byte is also acceptable.

My first attempt was

相关标签:
8条回答
  • 2021-02-01 18:05
    $ openssl rand -out random.tmp 1000000
    
    0 讨论(0)
  • 2021-02-01 18:07

    You can try head command:

    $ head -c 100000 /dev/urandom >dummy
    
    0 讨论(0)
提交回复
热议问题