Skip to main content
4 of 4
edited title
Rui F Ribeiro
  • 58k
  • 28
  • 156
  • 237

How to create a large file in UNIX?

I found a way in Windows to do such thing

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/

Is there a way in UNIX to copy a file, append and then repeat the process? Something like for .. cat file1.txt > file1.txt?

Thomas Lee
  • 373
  • 1
  • 3
  • 6