Problem
I need to do some testing requiring large files. Is there an easy way to generate a file of the size I need?
Solution
SCO OpenServer Release 5 has some special character files that
make it quite easy to generate a file of any size needed. These
files are:/dev/zero generates a file with all zeros
/dev/byte/hex/00 generates a file with all zeros
/dev/byte/hex/ff generates a file with all ones
/dev/byte/dec/0 generates a file with all zeros
/dev/byte/dec/255 generates a file with all ones
/dev/byte/octal/0 generates a file with all zeros
/dev/byte/octal/377 generates a file with all onesTo create a file issue the following command:
dd if=/dev/<charfile> of=/<path>/<filename> bs=1024k count=<number>where:<charfile> is one of the above files/<path>/<filename> is the file to be created<number> is the number of megabytesTo create a 250 megabyte file of all ones called bigfile.ff:
dd if=/dev/byte/hex/ff of=/tmp/bigfile.ff bs=1024k count=250