How to create multiple files with random data with bash

前端 未结 3 1439

How do I create multiple files (More than 20k, I need these files to run a test for syncying) with random data in OS X? I used a previously answered question (How Can I Create

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-04 13:13

    Not sure if you have any file naming requirements, but perhaps this:

    for x in {1..20000}; do
      dd if=/dev/random of=test$x.dat bs=10000 count=4
    done
    

提交回复
热议问题