| Skip Navigation Links | |
| Exit Print View | |
|
Sun QFS and Sun Storage Archive Manager 5.3 Reference Manual Sun QFS and Sun Storage Archive Manager 5.3 Information Library |
1. User Commands (Man Pages Section 1)
2. Maintenance Commands (Man Pages Section 1M)
3. Library Functions (Man Pages Section 3)
4. Library Functions (Man Pages Section 3X)
5. File Formats (Man Pages Section 4)
NAME
genfile - generate files of random data
SYNOPSIS
genfile [-D] [-R] [-S seed] [-c] [-d dirname] [-f] [-g] [-s
minsize[-maxsize]] [-v] filename...
AVAILABILITY
SUNWsamtp
DESCRIPTION
genfile generates and checks files of random data. The
files consist of records of 2113 random integers. The
record also includes the name of the file and the record
number. In addition, a file header is written before the
data records. The header contains the file name, the status
of the file (stat(2)), the random number seed and the data
length. This format allows the file data to be checked
later knowing only the file name.
The file is written using a buffer size of 41 records.
Using 41 and 2113 (which are prime numbers), avoids perform-
ing I/O in integer multiples of sector and block sizes.
File names may be generated by using the regular expression
"range" construction [x-y]. When such a filename argument
is used, each range construction, from right to left, is
successively incremented.
For example, the file name file[A-C][0-9] generates the file
names fileA0 through fileC9.
Note, you need to "shell escape" the range constructions.
If one of the files to be generated already exists, that
file name is skipped.
OPTIONS
-D Set "directio" on the file.
-R Allow rewriting of an existing file.
-Sseed
Set the random number seed.
-c Read and check files.
-ddirname
Use dirname as a prefix to the file names.
-f Do not report errors.
User Commands genfile(1)
-g Generate files. This is the default action.
-ssize
Generate file with data of length size. The actual
length of the file will be size plus the length of the
file header (168 bytes on SPARC, 156 on x86) and the
length of the file name plus one and rounded up to the
next multiple of four. For example if size is speci-
fied as 10 and the file name is /var/file2, the actual
length of the file would be 190 bytes on a SPARC plat-
form and 178 bytes on an x86 platform.
-sminsize-maxsize
Generate files with a random data length between min-
size and maxsize. The actual file length includes the
header and file name lengths as above.
-v Verbose output.