linux and robert
2010年1月13日 星期三
generate a (pseudo) random number in sh
Print a pseudo-random byte (hex) in sh:
cat /dev/urandom | od -t x1 -A n -N 1
->89
-----------
Create a pseudo-random file of size 1 MB:
dd if=/dev/urandom of=a.log bs=1M count=1
Ref:
Re: generating random number in sh
http://linuxcommando.blogspot.com/2008/06/create-file-of-given-size-with-random.html
沒有留言:
張貼留言
較新的文章
較舊的文章
首頁
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言