Quote:
Originally Posted by claire80
What does this command do?
command base64 /dev/urandom | head -n 700 > NewFile.txt
|
Well, the
base64 and
head are programs, so the'll have reference manuals:
Code:
man base64
man head
The first one converts binary data to a text-encoding suitable for certain situation.
The | pipe character takes the output from the first program and sends at input to the second.
The second program, with the -n 700 option, takes the first 700 lines and then stops.
The first file, /dev/urandom, is a connection from the kernel's random number source device.
The second file, NewFile.txt, is just a regular file which will contain the above mentioned 700 lines by virtue of a shell
redirection indicated by the > operator. See also chapter 6 of the book
The Linux Command Line.
In short, the line you ask about will produce a file containing 700 lines of random letter, numbers, and a few symbols.