我在Windows中找到了一种做这种事情的方法
echo "This is just a sample line appended to create a big file. " > dummy.txt
for /L %i in (1,1,21) do type dummy.txt >> dummy.txt
http://www.windows-commandline.com/how-to-create-large-dummy-file/
在UNIX中,有没有一种方法可以复制文件,追加然后重复该过程?像for .. cat file1.txt > file1.txt
什么?
for i in {1..1000000};do echo "string" >> file;done
猛扑
type file >> file
在无限循环中运行(至少在它足够大以至于不能容纳在缓冲区中时)。