Skip to content

Instantly share code, notes, and snippets.

@firmanelhakim
Created September 27, 2017 07:12
Show Gist options
  • Save firmanelhakim/c2de9f5ec2faebb09ebb42b2b3bf5ff3 to your computer and use it in GitHub Desktop.
Save firmanelhakim/c2de9f5ec2faebb09ebb42b2b3bf5ff3 to your computer and use it in GitHub Desktop.
Generate Random Text File in Linux
#!/bin/sh
base64 /dev/urandom | head -c 102400000 > urandom.txt
python -c 'import sys; a1="abcdefghijklmnopqrstuvwxyz0123456789"; a2=a1[::-1]; a=a1+a2[1:]; size=102400000; [sys.stdout.write(a) for i in range(1,size,len(a))]' > fast.txt
openssl rand 75000000 -base64 -out rand.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment