How to generate text files with random content and a specific size in OS X

Document created by B-F-F08DRX Employee on Dec 15, 2017
Version 1Show Document
  • View in full screen mode

Example below:


LC_CTYPE=C tr -dc A-Za-z0-9_ < /dev/urandom | head -c 8192 > 8KB.csv


The two items you would need to change are in BOLD.

The -c takes the count of BYTES you want to generate and after the '>' simple, you specify the path/filename you want to store the content in.