Command Line Quick Tip – generate a large file fast

Posted: February 18th, 2011 | Author: | Filed under: general | Comments Off on Command Line Quick Tip – generate a large file fast

Need to generate a large file fast to test a large file based operation? The yes command is your friend. Simply redirect the output of yes to a file and then ctrl+c to stop it. After about 10 seconds I have a 248 meg file.

My commands

yes > yes.txt
^C
dhermanmac:file dherman$ ls -lh
total 508504
-rw-r--r--  1 dherman  EDIETS1\domain users   248M Feb 18 15:25 yes.txt
dhermanmac:file dherman$ 

Comments are closed.