Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hello what is the unix command to create a binary file of arbitrary size ? I used it before but I forgot the command name. Pls send your reply to my email address chicheongweng@yahoo.com also

Binary file? No idea. If you need to create a file for swap on solaris - mkfile.
DESCRIPTION
mkfile creates one or more files that are suitable for use as NFS-mounted swap areas, or as local swap areas. When a root user executes mkfile(), the sticky bit is set and the file is padded with zeros by default. When non-root users execute mkfile(), they must manually set the sticky bit using chmod(1). The default size is in bytes, but it can be flagged as kilobytes, blocks, or megabytes, with the k, b, or m suffixes, respectively.

Hi cweng,
Try:
cat /dev/urandom > filename (press ctrl-c
after a few seconds)
OR...
head -c [# bytes] /dev/urandom > filename
Im sure there are a few other ways also.
--
Ramsey Brenner
osdisc.com support

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |