https://github.com/pdrb/nim-fwrite
Create files of the desired size
https://github.com/pdrb/nim-fwrite
Last synced: 4 months ago
JSON representation
Create files of the desired size
- Host: GitHub
- URL: https://github.com/pdrb/nim-fwrite
- Owner: pdrb
- License: mit
- Created: 2019-10-01T00:33:07.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-09T21:43:16.000Z (over 6 years ago)
- Last Synced: 2024-12-31T05:23:57.632Z (over 1 year ago)
- Language: Nim
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
fwrite
======
Create files of the desired size.
A Python version is `also available `_.
Simple example::
$ fwrite testfile 100M
Install
=======
**Using nimble**::
$ nimble install fwrite
**Using nim compiler**:
Since only the standard library is used, just download the single source code
file and compile it::
$ wget https://raw.githubusercontent.com/pdrb/nim-fwrite/master/src/fwrite.nim
$ nim c -d:release fwrite.nim
Usage
=====
::
Usage: fwrite filename size [options]
create files of the desired size, e.g., 'fwrite test 10M'
Options:
-v, --version show program's version number and exit
-h, --help show this help message and exit
-r, --random use random data (very slow)
-l, --linefeed append line feed every 1023 bytes
Examples
========
Create file "test" with 100KB::
$ fwrite test 100K
Create file "test" with 1GB::
$ fwrite test 1G
Create file "test" with 10MB of random data::
$ fwrite test 10M -r
Create file "test" with 10MB of random data with line feed::
$ fwrite test 10M -r -n