October 10

Linux: Create a small file of random data

There a several ways to create a file with random data.
Here are two options:

head -c 100k /dev/urandom > test.txt

dd if=/dev/urandom of=test2.txt bs=1k count=100

The key is creating the data from /dev/urandom or /dev/random

By: Timothy Conrad


Copyright 2021. All rights reserved.

Posted October 10, 2017 by Timothy Conrad in category "Linux

About the Author

If I were to describe myself with one word it would be, creative. I am interested in almost everything which keeps me rather busy. Here you will find some of my technical musings. PGP: 4CB8 91EB 0C0A A530 3BE9 6D76 B076 96F1 6135 0A1B