mkfile does not exist
State Changed From-To: open->feedback Hi Jim What should the mkfile command do? If the command should just create an empty file try 'touch'. If not please describe the purpose of the command. Or even better send an implementation of the command and a man page as a follow-up to this PR, by sending mail to FreeBSD-gnats-submit@freebsd.org with the subject of this mail as subject. Thanks Johan K
The command not only creates a file, but also creates it with a certain size > 0. I have included the SunOS man page to see how it is used. - JimP ---------- Forwarded Message ---------- Subject: Re: bin/21789: no mkfile command Date: Sat, 7 Oct 2000 07:38:55 -0700 (PDT) From: johan@FreeBSD.org Synopsis: no mkfile command State-Changed-From-To: open->feedback State-Changed-By: johan State-Changed-When: Sat Oct 7 07:33:29 PDT 2000 State-Changed-Why: Hi Jim What should the mkfile command do? If the command should just create an empty file try 'touch'. If not please describe the purpose of the command. Or even better send an implementation of the command and a man page as a follow-up to this PR, by sending mail to FreeBSD-gnats-submit@freebsd.org with the subject of this mail as subject. Thanks Johan K http://www.freebsd.org/cgi/query-pr.cgi?pr=21789 ------------------------------------------------------- -- --- @(#) $Id: dot.signature,v 1.9 2000/07/10 16:43:05 pirzyk Exp $ __o Jim.Pirzyk@disney.com ------------------------------------- _'\<,_ Senior Systems Engineer, Walt Disney Feature Animation (*)/ (*)
On Mon, Oct 09, 2000 at 08:30:05AM -0700, Jim Pirzyk wrote: > The following reply was made to PR bin/21789; it has been noted by GNATS. > > From: Jim Pirzyk <Jim.Pirzyk@disney.com> > To: FreeBSD-gnats-submit@freebsd.org > Cc: > Subject: Fwd: Re: bin/21789: no mkfile command > Date: Mon, 9 Oct 2000 08:19:42 -0700 > > --Boundary-=_qmZrHLajoetbkwlTZTViemHPfybp > Content-Type: text/plain > Content-Transfer-Encoding: 8bit > > > The command not only creates a file, but also creates it with a certain > size > 0. I have included the SunOS man page to see how it is used. > > - JimP Hmm except for the 'sticky bit' part, this sounds like /bin/dd to me.. or am I missing something here? G'luck, Peter -- This sentence contains exactly threee erors.
At Mon, 09 Oct 2000 08:30:05 PDT, Jim Pirzyk wrote: > > The command not only creates a file, but also creates it with a certain > size > 0. I have included the SunOS man page to see how it is used. > > - JimP > This functionality is provided by the truncate(1) command. Okey I know it is not exatly the same but I think its close enough. /Johan K truncate(1) FreeBSD General Commands Manual truncate(1) NAME truncate - truncate or extend a file to a specified length SYNOPSIS truncate [-h] [-m mode] size file ... DESCRIPTION The command truncate causes the file file to be truncated or extended to length bytes in size. If the file was larger than this size, the extra data is lost. If the file was smaller than this size, it will be extended as if by writing bytes with the value zero. If the file doesn't exist, it is created, either with mode 0644 or the given mode mode. RETURN VALUES truncate returns 0 on success, an error value as specified in errno(7) otherwise. SEE ALSO truncate(2) AUTHOR truncate has been written by Alexander Langer. This manpage is based on the truncate(2) manual page. BSD May 25, 2000 1
At Mon, 09 Oct 2000 23:01:19 +0200, Johan Karlsson wrote: > This functionality is provided by the truncate(1) command. > Okey I know it is not exatly the same but I think its close enough. > I just managed to send an old version of the man page, it should be this on. Does this command solve your task that you need mkfile for? TRUNCATE(1) FreeBSD General Commands Manual TRUNCATE(1) NAME truncate - truncate or extend the length of files SYNOPSIS truncate [-c] -s [+|-]size[K|M|G] file ... truncate [-c] -r rfile file ... DESCRIPTION The truncate utility adjusts the length of each regular file given on the command-line. The following options are available: -c Do not create files if they do not exist. The truncate utility does not treat this as an error. No error messages are displayed and the exit value is not affected. -r rfile Truncate files to the length of the file rfile. -s [+|-]size[K|M|G] If the size argument is preceded by a plus sign (`+'), files will be extended by this number of bytes. If the size argument is preceded by a dash (`-'), file lengths will be reduced by no more than this number of bytes, to a minimum length of zero bytes. Otherwise, the size argument specifies an absolute length to which all files should be extended or reduced as appropriate. The size argument may be suffixed with one of `K', `M', `G' to indicate a multiple of Kilobytes, Megabytes or Gigabytes respec- tively. Exactly one of the -r and -s options must be specified. If a file is made smaller, its extra data is lost. If a file is made larger, it will be extended as if by writing bytes with the value zero. If the file does not exist, it is created unless the -c option is speci- fied. Note that, while truncating a file causes space on disk to be freed, ex- tending a file does not cause space to be allocated. To extend a file and actually allocate the space, it is necessary to explicitly write data to it, using (for example) the shell's `>>' redirection syntax, or dd(1). DIAGNOSTICS The truncate utility exits 0 on success, and >0 if an error occurs. If the operation fails for an argument, truncate will issue a diagnostic and continue processing the remaining arguments. SEE ALSO dd(1), touch(1), truncate(2) STANDARDS The truncate utility conforms to no known standards. HISTORY The truncate utility first appeared in FreeBSD 4.2. AUTHORS The truncate utility and this manual page were written by Sheldon Hearn <sheldonh@uunet.co.za>.
Seems tnat truncate is not in the FreeBSD 4.1-RELEASE. Is it in -STABLE or -CURRENT? I would like to try it out, the man page seems to make it a viable option. - JimP -- --- @(#) $Id: dot.signature,v 1.9 2000/07/10 16:43:05 pirzyk Exp $ __o Jim.Pirzyk@disney.com ------------------------------------- _'\<,_ Senior Systems Engineer, Walt Disney Feature Animation (*)/ (*)
At Tue, 24 Oct 2000 08:40:03 PDT, Jim Pirzyk wrote: > The following reply was made to PR bin/21789; it has been noted by GNATS. > > From: Jim Pirzyk <Jim.Pirzyk@disney.com> > To: freebsd-gnats-submit@FreeBSD.org, Jim.Pirzyk@disney.com > Cc: > Subject: Re: bin/21789: no mkfile command > Date: Tue, 24 Oct 2000 08:37:22 -0700 > > Seems tnat truncate is not in the FreeBSD 4.1-RELEASE. Is it in -STABLE > or -CURRENT? > > I would like to try it out, the man page seems to make it a viable > option. > Hi truncate was MFC:ed to 4-Stable in august, hence it is in 4.1.1-RELEASE. /Johan K
At Tue, 24 Oct 2000 19:20:35 +0200, Johan Karlsson wrote: > At Tue, 24 Oct 2000 08:40:03 PDT, Jim Pirzyk wrote: > > Seems tnat truncate is not in the FreeBSD 4.1-RELEASE. Is it in -STABLE > > or -CURRENT? > > > > I would like to try it out, the man page seems to make it a viable > > option. > > > > Hi > > truncate was MFC:ed to 4-Stable in august, hence it is in 4.1.1-RELEASE. Hi Jim, did truncate(1) solve your problem? Is it ok to close this PR? /Johan K
> At Tue, 24 Oct 2000 19:20:35 +0200, Johan Karlsson wrote: > > At Tue, 24 Oct 2000 08:40:03 PDT, Jim Pirzyk wrote: > > > Seems tnat truncate is not in the FreeBSD 4.1-RELEASE. Is it in -STABLE > > > or -CURRENT? > > > > > > I would like to try it out, the man page seems to make it a viable > > > option. > > > > > > > Hi > > > > truncate was MFC:ed to 4-Stable in august, hence it is in 4.1.1-RELEASE. > > Hi Jim, > > did truncate(1) solve your problem? > > Is it ok to close this PR? Yes. Thanks - JimP > > /Johan K >
State Changed From-To: feedback->closed truncate(1) solved the problem.
Dear FreeBSD staff, I wrote mkfile(8) for FreeBSD. Here it is: http://www.infolab.ne.jp/~hatanou/freebsd/mkfile/mkfile.tar.gz It acts just like SunOS 4.1's mkfile(8). Could you please consider including it into FreeBSD? ---- HATANOU Tomomi.