August 2019
Beginner to intermediate
798 pages
17h 2m
English
In this section, you will learn how to read from the /dev/random system device. The purpose of the /dev/random system device is to generate random data, which you might use for testing your programs or, in this case, as the seed for a random number generator. Getting data from /dev/random can be a little bit tricky, and this is the main reason for specifically discussing it here.
On a macOS Mojave machine, the /dev/random file has the following permissions:
$ ls -l /dev/random crw-rw-rw- 1 root wheel 14, 0 Mar 12 20:24 /dev/random
Similarly, on a Debian Linux machine, the /dev/random system device has the following UNIX file permissions:
$ ls -l /dev/random crw-rw-rw- 1 root root 1, 8 Oct 13 12:19 /dev/random
Read now
Unlock full access