I need to create a text file which should contain random text data that can be read by human. I know that we can use /dev/urandom and /dev/random for getting random data. But it is not readable by humans. I need to create a file which contains random text format. Is there any way to do that?
Answer
We can do it by following command
base64 /dev/urandom | head -c 10000000 > file.txt
It creates a file with name file.txt size of 10 MB.
No comments:
Post a Comment