[ELI5] /dev/null, /dev/random, /dev/urandom and /dev/zero

841 views

I’ve been reading about this files and also I have tried to inspect by myself about this files (file, ll, Stat and some other commands) but I just don’t understand them.

Can someone please explain me what are these files and how can I used them?

In: Technology

8 Answers

Anonymous 0 Comments

Null anything you write vanishes – used when you don’t want to record or look at the result of a command.
Zero produces binary zeroes – use it to erase files.
Random produces random binary numbers, attempting to produce high quality output, so reads can be slow.
Urandom produces fast random numbers.
Edit: use them by shell redirection, or with ‘dd’ and ‘cat’. dd count=512 if=/dev/zero of=/filefullofzeroes

You are viewing 1 out of 8 answers, click here to view all answers.