App-CreateRandomFile
view release on metacpan or search on metacpan
script/create-random-file view on Meta::CPAN
=encoding UTF-8
=head1 NAME
create-random-file - Create file with random content
=head1 VERSION
This document describes version 0.021 of create-random-file (from Perl distribution App-CreateRandomFile), released on 2023-11-20.
=head1 SYNOPSIS
B<create-random-file> B<L<--help|/"--help, -h, -?">> (or B<L<-h|/"--help, -h, -?">>, B<L<-?|/"--help, -h, -?">>)
B<create-random-file> B<L<--version|/"--version, -v">> (or B<L<-v|/"--version, -v">>)
B<create-random-file> [B<L<--config-path|/"--config-path=s, -c">>=I<path>|B<L<-c|/"--config-path=s, -c">>|B<L<--no-config|/"--no-config, -C">>|B<L<-C|/"--no-config, -C">>] [B<L<--config-profile|/"--config-profile=s, -P">>=I<profile>|B<L<-P|/"--config...
See examples in the L</EXAMPLES> section.
=head1 DESCRIPTION
Create "random" file with a specified size. There are several choices of what
random data to use:
=over
=item * random bytes, created using C<rand()>
=item * repeated pattern supplied from C<--pattern> command-line option
=back
TODO:
=over
=item * random bytes, source from /dev/urandom
=item * random lines from a specified file
=item * random byte sequences from a specified file
=back
=head1 OPTIONS
C<*> marks required options.
=head2 Main options
=over
=item B<--interactive>
Whether or not the program should be interactive.
If set to false then will not prompt interactively and usually will proceed
(unless for dangerous stuffs, in which case will bail immediately.
=item B<--name>=I<s>*
(No description)
Can also be specified as the 1st command-line argument.
=item B<--overwrite>
Whether to overwrite existing file.
If se to true then will overwrite existing file without warning. The default is
to prompt, or bail (if not interactive).
=item B<--pattern>=I<s@>
(No description)
Can be specified multiple times.
=item B<--patterns-json>=I<s>
See C<--pattern>.
=item B<--random-bytes>
(No description)
=item B<--size>=I<s>*, B<-s>
Size (e.g. 10K, 22.5M).
Can also be specified as the 2nd command-line argument.
=back
=head2 Configuration options
=over
=item B<--config-path>=I<s>, B<-c>
Set path to configuration file.
Can actually be specified multiple times to instruct application to read from
multiple configuration files (and merge them).
=item B<--config-profile>=I<s>, B<-P>
Set configuration profile to use.
A single configuration file can contain profiles, i.e. alternative sets of
values that can be selected. For example:
[profile=dev]
username=foo
pass=beaver
[profile=production]
username=bar
pass=honey
When you specify C<--config-profile=dev>, C<username> will be set to C<foo> and
C<password> to C<beaver>. When you specify C<--config-profile=production>,
C<username> will be set to C<bar> and C<password> to C<honey>.
=item B<--no-config>, B<-C>
( run in 0.507 second using v1.01-cache-2.11-cpan-6aa56a78535 )