linux获取随机数的方法集合
2016-04-19 21:52
519 查看
linux产生随机的方法
取8位数字的方法
本文出自 “崔德华运维打工从业路” 博客,请务必保留此出处http://cuidehua.blog.51cto.com/5449828/1765554
取8位数字的方法
[root@master scripts]# echo $RANDOM 12465
[root@master scripts]# echo $((RANDOM+10000000)) 10023190
[root@master scripts]# echo $RANDOM | md5sum | cut -c 1-8 ae74cedb
[root@master scripts]# uuidgen| md5sum | cut -c 1-8 fdfca8ec
[root@master scripts]# mkpasswd -l 8 6zhFj7T>
[root@master scripts]# echo `date +%s` | md5sum | cut -c 1-8 f6d58a59更随机的方法
[root@master scripts]# echo "`date +%s`$RANDOM" | md5sum | cut -c 1-8 0daddd89
[root@master scripts]# openssl rand -base64 4 jW/xRw==
[root@master scripts]# head /dev/urandom | cksum 1181625912 2520
[root@master scripts]# cat /proc/sys/kernel/random/uuid == uuidgen dfdec661-b0b7-48d3-b0db-73d1d7d09e06
本文出自 “崔德华运维打工从业路” 博客,请务必保留此出处http://cuidehua.blog.51cto.com/5449828/1765554
相关文章推荐
- linux的串口驱动分析
- Linux 游戏服务器搭建教程详解
- rz,sz是Linux
- centos6 常用重要命令
- 每天一个linux命令(10):cat
- 查看CentOS的CPU内存信息及操作系统的版本信息
- linux进程状态详解
- Linux(Ubuntu)下嵌入式gdb调试环境
- linux快捷键
- linux用户登录日志
- 《Linux内核分析》期中总结
- Linux内核抢占机制 - 简介
- 《linux内核分析》期末总结
- ubantu下解压命令大全
- CentOS7 时区设置.md
- 安装源-centos6.6
- linux kernel gic 介绍
- ubuntu Error: E: Sub-process /usr/bin/dpkg returned an error code (1)
- 新手用linux的记录(centOS6.5)
- 在linux(fedora23)上开发java