Subject: New command...
To: NetBSD Current Users <current-users@netbsd.org>
From: Greywolf <greywolf@starwolf.com>
List: current-users
Date: 09/04/2003 18:16:20
Greetings,

I've taken the liberty of writing "mkfile" from scratch, but I'm
faced with something of a conundrum, so I'm putting it out:

- Would it be worthwhile to consider adding it to the set of core
  utilities (i.e. living in /bin or /usr/bin)?

- Would it even be worthwhile as a pkg?

- If either of the above are true, how would I submit it?

History:  I have the need to create the occasional blank file and I get
tired of typing "dd if=/dev/zero of=file size=128k" and/or trying to
figure out the requisite arguments to get a sparse empty file, not to
mention that I have a nervous twitch related to depending on /dev/zero for
anything.  I'm also somewhat spoiled by some Sunisms on occasion (cf.
being able to type in the partition name as an argument to fsck_ffs(8) and
dump(8)).

Uses:  mkfile is good for creating blank files for use with vnconfig
and as NFS swap spaces, at least.  I'm sure that creative minds can come
up with others.

Writing a shell script to do this would probably have been simpler,
but there, again, I didn't want to depend on /dev/zero.  Seeing as
Solaris (at least) has mkfile (and I think SunOS 4.1.4 had it as
well, but I can't be sure at the immediate moment).

It's coded, manpaged and ready to go.  I'd sure appreciate commentary
one way or the other as to how many other people out there think
it would make a nice addition to the system.

				--*greywolf;
--
NetBSD: Servers' choice!