Technical article 105680

How do I create a large file for testing on OpenServer 5?

OpenServer 5.0.0OpenServer 5.0.2OpenServer 5.0.4

Written · Last revised

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 ones

To 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 megabytes

To 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

From the Xinuos technical article database, record 105680. Reproduced with permission. The original is at www.sco.com/ta/105680, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.