chiark / gitweb /
Use /dev/urandom (or corresponding file) by default in --both mode
[vbig.git] / vbig.1
1 \"
2 \" This file is part of vbig.
3 \" Copyright (C) 2011 Richard Kettlewell
4 \"
5 \" This program is free software: you can redistribute it and/or modify
6 \" it under the terms of the GNU General Public License as published by
7 \" the Free Software Foundation, either version 3 of the License, or
8 \" (at your option) any later version.
9 \"
10 \" This program is distributed in the hope that it will be useful,
11 \" but WITHOUT ANY WARRANTY; without even the implied warranty of
12 \" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 \" GNU General Public License for more details.
14 \"
15 \" You should have received a copy of the GNU General Public License
16 \" along with this program.  If not, see <http://www.gnu.org/licenses/>.
17 \"
18 .TH vbig 1
19 .SH NAME
20 vbig \- create or verify a large but pseudo-random file
21 .SH SYNOPSIS
22 \fBvbig \fR[\fB--seed \fRSEED\fR] [\fB--both\fR|\fB--create\fR|\fB--verify\fR] \fIPATH \fR[\fISIZE\fR]
23 .br
24 \fBvbig --help
25 .br
26 \fBvbig --version
27 .SH DESCRIPTION
28 \fBvbig\fR creates a file of specified size full of predictable
29 psuedo-random data, and/or verifies that it has the expected contents.
30 The intended use is to test whether storage media really do what they
31 say on the tin.
32 .PP
33 \fISIZE\fR may end with \fBK\fR, \fBM\fR or \fBG\fR to select (binary)
34 kilobytes, megabytes or gigabytes.
35 The size is mandatory when creating a file but optional when verifying
36 it, unless \-\-entire is specified.  If \fBSIZE\fR not specified when
37 writing-then-verifying, it is as if \fB\-\-entire\fR was specified.
38 .PP
39 If no seed or seed file is specified:
40 in \fB--both\fR mode a fresh random seed is read from the system's
41 random number generator; in other modes a fixed default seed is used.
42 .SH OPTIONS
43 .TP
44 .B --seed\fR, \fB-s \fISEED
45 Specifies the random seed to use.
46 Optional.
47 .TP
48 .B --seed-file\fR, \fB-S \fISEED-FILE
49 Specifies wehre the random seed should be read from.  The
50 first \fISEED-LENGTH\fR bytes will be used, or the whole file
51 if it is shorter.
52 .TP
53 .B --seed-length\fR, \fB-L \fISEED-LENGTH
54 Specifies the (maximum) seed length in bytes.
55 Optional; default is 2048.
56 .TP
57 .B --both\fR, \fB-b
58 Selects both mode.
59 \fIPATH\fR will be filled with \fISIZE\fR psuedo-random bytes and
60 then read to check that it contains the data just written.
61 This is the default.
62 .TP
63 .B --create\fR, \fB-c
64 Selects create mode.
65 \fIPATH\fR will be filled with \fISIZE\fR psuedo-random bytes.
66 .TP
67 .B --verify\fR, \fB-v
68 Selects verify mode.
69 Checks that \fIPATH\fR has exactly the contents that would be produced
70 by the equivalent \fB--create\fR call.
71 .TP
72 .B --flush\fR, \fB-f
73 Flush cached data after creating the file or before verifying it.
74 On some platforms, only root can use this option.
75 .TP
76 .B --entire\fR, \fB-e
77 When writing, keep going until the device is full (No space left
78 on device).  When reading, keep going until the end of the file
79 or device.  \fISIZE\fR should not be specified.  The actual size
80 written or verified will be printed to stdout.
81 .TP
82 .B --help\fR, \fB-h
83 Displays a usage message.
84 .TP
85 .B --version\fR, \fB-h
86 Displays the version strings.
87 .SH AUTHOR
88 Richard Kettlewell <rjk@greenend.org.uk>