10 More Discussions You Might Find Interesting
1. HP-UX
Hi,
In our HP-UX B.11.11. I could not find dev/urandom and dev/random
Are all pseudo-devices implemented as device drivers, or in need to run /configure some package to install the package to have dev/urandom.
Please help (4 Replies)
Discussion started by: rashi
4 Replies
2. UNIX for Advanced & Expert Users
Hi
I'm running the following command to generate a random password in a KSH script on a RHEL Linux VM but for some reason the cmd is not being closed and it's causing problems on the host.
PASSWORD="$(cat /dev/urandom | tr -dc "a-zA-Z0-9" | fold -w 16 | head -1)Aa0!"
The code worked as... (2 Replies)
Discussion started by: user052009
2 Replies
3. Shell Programming and Scripting
Hello,
I'm trying to send the error output of a 'cat' operation to /dev/null like this:
cat /dirA/dirB/temp*.log > /dirA/dirB/final.log 2>/dev/null
This works perfectly in a terminal, but not when placed in a script.
If there are no files matching temp*.log the script outputs an error... (7 Replies)
Discussion started by: Nils88
7 Replies
4. Slackware
I am having problems using soundes. Until a few moments ago
the following commands produced errors and no sound:
cat /usr/share/apps/kolf/sounds/blackhole.wav/ > /dev/dsp yielded:
/dev/dsp: Invalid argument
cat /usr/share/apps/kolf/sounds/blackhole.wav > /dev/audio yelded:
/dev/audio:... (3 Replies)
Discussion started by: slak0
3 Replies
5. Shell Programming and Scripting
I have a file with a single filename in it, which I want to assign to a BASH variable, so I've been trying:
c=$(head -1 somefile)
echo $c
which outputs correctly, but them when I do
...
somecommand $c
it says it can't find the file, is that because it's grabbing the whole line, and... (5 Replies)
Discussion started by: unclecameron
5 Replies
6. Shell Programming and Scripting
cat myname.txt
John Doe I
John Doe II
John Doe III
-----------------------------------------------------------------------
for i in `cat myname.txt`
do
echo This is my name: $i >> thi.is.my.name.txt
done
-----------------------------------------------------------------------
cat... (1 Reply)
Discussion started by: danimad
1 Replies
7. UNIX for Dummies Questions & Answers
Hi,
Excuse my ignorance here - I'm a networks man and my knowledge of all things unix is somewhat limited.
We have a very large file (/var/tmp/mond.log) that we need to zero - does the "cat /dev/null > /var/tmp/mond.log" command achieve this? (4 Replies)
Discussion started by: freakydancer
4 Replies
8. UNIX for Dummies Questions & Answers
Hi, how do I use /dev/urandom to generate a single number between 1-100? I can od /dev/urandom but it gives me an endless list of random numbers, I just want 1 between 1-100. How can I get that? Thanks. (12 Replies)
Discussion started by: Takumi
12 Replies
9. UNIX for Dummies Questions & Answers
I've a major file which includes other files and now I wanna 'cut' the file in several minor parts....like
....
find / -name "*.tmp" >filea
wc -l filea >fileb
sed -e '1s/ filea//' fileb >filec
AMOUNT=`cat filec`
if ; then
cat file a |head -100l (ell) |tail -100l >filec
cat file a |head... (6 Replies)
Discussion started by: svennie
6 Replies
10. Shell Programming and Scripting
hai
in my shell script i want to replace the following commands
1) more
2) head
3) tail
i want to try all type of possible options avaliabul in the above commands
please help in implementing those commands (9 Replies)
Discussion started by: g_s_r_c
9 Replies
RANDOM(4) BSD Kernel Interfaces Manual RANDOM(4)
NAME
random , urandom -- random data source devices.
SYNOPSIS
pseudo-device random
DESCRIPTION
The random device produces uniformly distributed random byte values of potentially high quality.
To obtain random bytes, open /dev/random for reading and read from it.
The same random data is also available from getentropy(2). Using the getentropy(2) system call interface will provide resiliency to file
descriptor exhaustion, chroot, or sandboxing which can make /dev/random unavailable. Additionally, the arc4random(3) API provides a fast
userspace random number generator built on the random data source and is preferred over directly accessing the system's random device.
/dev/urandom is a compatibility nod to Linux. On Linux, /dev/urandom will produce lower quality output if the entropy pool drains, while
/dev/random will prefer to block and wait for additional entropy to be collected. With Yarrow, this choice and distinction is not necessary,
and the two devices behave identically. You may use either.
The random device implements the Yarrow pseudo random number generator algorithm and maintains its entropy pool. The kernel automatically
seeds the algorithm with additional entropy during normal execution.
FILES
/dev/random
/dev/urandom
HISTORY
A random device appeared in the Linux operating system.
Darwin September 6, 2001 Darwin