1 % bup-random(1) Bup %BUP_VERSION%
2 % Avery Pennarun <apenwarr@gmail.com>
7 bup-random - generate a stream of random output
11 bup random [-S seed] [-fv] \<numbytes\>
15 `bup random` produces a stream of pseudorandom output bytes to
16 stdout. Note: the bytes are *not* generated using a
17 cryptographic algorithm and should never be used for
20 Note that the stream of random bytes will be identical
21 every time `bup random` is run, unless you provide a
22 different `seed` value. This is intentional: the purpose
23 of this program is to be able to run repeatable tests on
24 large amounts of data, so we want identical data every
27 `bup random` generates about 240 megabytes per second on a
28 modern test system (Intel Core2), which is faster than you
29 could achieve by reading data from most disks. Thus, it
30 can be helpful when running microbenchmarks.
35 : the number of bytes of data to generate. Can be used
36 with the suffices `k`, `M`, or `G` to indicate
37 kilobytes, megabytes, or gigabytes, respectively.
40 : use the given value to seed the pseudorandom number
41 generator. The generated output stream will be
42 identical for every stream seeded with the same value.
43 The default seed is 1. A seed value of 0 is equivalent
47 : generate output even if stdout is a tty. (Generating
48 random data to a tty is generally considered
49 ill-advised, but you can do if you really want.)
52 : print a progress message showing the number of bytes that
53 has been output so far.
57 $ bup random 1k | sha1sum
58 2108c55d0a2687c8dacf9192677c58437a55db71 -
60 $ bup random -S1 1k | sha1sum
61 2108c55d0a2687c8dacf9192677c58437a55db71 -
63 $ bup random -S2 1k | sha1sum
64 f71acb90e135d98dad7efc136e8d2cc30573e71a -
66 $ time bup random 1G >/dev/null
67 Random: 1024 Mbytes, done.
73 $ bup random 1G | bup split -t --bench
74 Random: 1024 Mbytes, done.
75 bup: 1048576.00kbytes in 18.59 secs = 56417.78 kbytes/sec
76 1092599b9c7b2909652ef1e6edac0796bfbfc573
80 Part of the `bup`(1) suite.