Linux generates a random method
Method of taking 8-digit number
[Email protected] scripts]# echo $RANDOM 12465
[[email protected] scripts]# echo $ ((random+10000000)) 10023190
[Email protected] scripts]# echo $RANDOM | md5sum | Cut-c 1-8ae74cedb
[Email protected] scripts]# uuidgen| md5sum | Cut-c 1-8 Fdfca8ec
[Email protected] scripts]# mkpasswd-l 86zhfj7t>
[[email protected] scripts]# echo ' Date +%s ' | md5sum | Cut-c 1-8f6d58a59
More Random methods
[[email protected] scripts]# echo "' Date +%s ' $RANDOM" | md5sum | Cut-c 1-80daddd89
[email protected] scripts]# OpenSSL rand-base64 4jw/xrw==
[Email protected] scripts]# Head/dev/urandom | Cksum 1181625912 2520
[Email protected] scripts]# Cat/proc/sys/kernel/random/uuid = = uuidgendfdec661-b0b7-48d3-b0db-73d1d7d09e06
This article is from the "Tridewah operation and maintenance work Road" blog, please be sure to keep this source http://cuidehua.blog.51cto.com/5449828/1766008
A collection of methods for obtaining random numbers from Linux