| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
testFilesMake is a Linux portable executable created from the bash script Test_Files_Make (private Github repository) using shc.
Use testFilesCreate as an alternative :
This requires a Linux bash environment to run. Will run in Microsoft WSL2(Linux), TestFilesMake will not run in MSYS2, Gitbash and Cygwin environmants. testFilesMake is an exceutable created from the shc utility. More : Github shc
File Contents
Other Options
-f <file size> Manditory, minimum 1 byte. File sizes have to be designated by B, K, M or G. Example 2KiB = 2K, 3MiB = 3M 200GiB = 200G
-o <exisiting directory> Optional, create file in a exisiting directory. Default is your current directory.
Files created will have names in the format of tfm_YYYYMMDD-mmss_file_<file number>
File Contents: Digits
-D n Where n is a number 1 to 10.
This selects the numbers in the character pool used
File Contents: Printable ASCI characters:_
-P n Where n is a number 1 to 95.(the ASCI character set)
Examples:
File Contents: Sparse File
-S Null filled sparse files. Although disk usage is minimal their apparent size may be used to determine capacity usage. Not to be used on Windows filesystems.
VALIDATE FILE CONTENTS
Validate all Files:
od -N <bytes> -Ax -t x1z <file name>
Validate printable character distribution:
od -a <file name> | cut -b 9- | tr " " \\n | egrep -v "^$" | sort | uniq -c
Output
Validate sparse fILes:
NOTES
EXAMPLES
Create ten 5 MiB files containing a randonly distribution of the first 30 printable characters of the ASCII character set.
$./testFilesMake -P 30 -f 5M -n 10
Creating 10x 5M files in /home/ted/tmp/
Files containing random selection from the 30 char set: !"#$%&'()*+,-./0123456789:;<=>
Creating file 1 Done: 5.0M /home/ted/tmp/tfm_20251019-1916-53_file_1
Creating file 2 Done: 5.0M /home/ted/tmp//tfm_20251019-1916-53_file_2
Creating file 3 Done: 5.0M /home/ted/tmp//tfm_20251019-1916-53_file_3
Creating file 4 Done: 5.0M /home/ted/tmp/tfm_20251019-1916-53_file_4
Creating file 5 Done: 5.0M /home/ted/tmp/tfm_20251019-1916-53_file_5
Creating file 6 Done: 5.0M /home/ted/tmp/tfm_20251019-1916-53_file_6
Creating file 7 Done: 5.0M /home/ted/tmp/tfm_20251019-1916-53_file_7
Creating file 8 Done: 5.0M /home/ted/tmp/tfm_20251019-1916-53_file_8
Creating file 9 Done: 5.0M /home/ted/tmp/tfm_20251019-1916-53_file_9
Creating file 10 Done: 5.0M /home/ted/tmp/tfm_20251019-1916-53_file_10
Total Directory Usage of output directory: /home/ted/tmp
102435.066 KiB
100.427 MiB
0.098 GiB
Total disk usage (du -sk) : 101M
NOTE: Totals are for the entire directory contents not just test files made by this script run
$
Create five 1 GiB sparse files
$./testFilesMake -S -f 1G -n 5
Creating 5x 1G SPARSE files in /home/ted/tmp
Creating file 1 DONE: Apparent Size: 1.0G Disk Usage: 0 /home/ted/tmp/tfm_20251019-1937-01_Sfile_1
Creating file 2 DONE: Apparent Size: 1.0G Disk Usage: 0 /home/bob/tmp/tfm_20251019-1937-01_Sfile_2
Creating file 3 DONE: Apparent Size: 1.0G Disk Usage: 0 /home/bob/tmp/tfm_20251019-1937-01_Sfile_3
Creating file 4 DONE: Apparent Size: 1.0G Disk Usage: 0 /home/bob/tmp/tfm_20251019-1937-01_Sfile_4
Creating file 5 DONE: Apparent Size: 1.0G Disk Usage: 0 /home/bob/tmp/tfm_20251019-1937-01_Sfile_5
Total Directory Usage of output directory: /home/ted/tmp
5242907.188 KiB
5140.105 MiB
5.020 GiB
Total disk usage (du -sk) : 32K
NOTE: Totals are for the entire directory contents not just test files made by this script run
$
Create fifty 5GiB files containing only the randonly distributed digits 0, 1 , 2, 3 and 4
testFilesMake -D 5 -f 5G -n 50
Create a single 1MiB file containing these characters randomly distributed !"#$%&'()*+,-./0123456789:;<=>?@ABC
testFilesMake -P 35 -f 1M -n 1
Same as previous, but with files being generated in the test_files directory within the user's home directory.
testFilesMake -P 35 -f 1M -n 1 -o ~/test_files
Create 1,000 1KiB files containing these characters randomly distributed abcdefghij
testFilesMake -P 10 -f 1K -n 1000
WINDOWS SPARSE FILES - How to make:
On Windows run the following as administrator
fsutil File CreateNew <file name> <size in bytes> fsutil Sparse SetFlag <file name> fsutil Sparse SetRange <file name> 0 <size in bytes>
WSL2-Linux cannot run windows commands and programs that require administrator privilege.
| Back | FazBrowse Home | New Git URL |