Bug 21789 - no mkfile command
Summary: no mkfile command
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 4.1-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-10-06 21:30 UTC by Jim.Pirzyk
Modified: 2001-11-07 15:40 UTC (History)
0 users

See Also:


Attachments
tmp.dat (1.79 KB, text/english)
2000-10-09 16:19 UTC, Jim.Pirzyk
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jim.Pirzyk 2000-10-06 21:30:01 UTC
	mkfile does not exist
Comment 1 Johan Karlsson freebsd_committer freebsd_triage 2000-10-07 15:33:29 UTC
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
Comment 2 Jim.Pirzyk 2000-10-09 16:19:42 UTC
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 
(*)/ (*)  
Comment 3 Peter Pentchev 2000-10-09 16:40:49 UTC
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.
Comment 4 k 2000-10-09 22:01:19 UTC
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
Comment 5 k 2000-10-10 16:18:10 UTC
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>.
Comment 6 Jim.Pirzyk 2000-10-24 16:37:22 UTC
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
(*)/ (*)

Comment 7 k 2000-10-24 18:20:35 UTC
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
Comment 8 k 2001-02-25 11:24:23 UTC
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
Comment 9 Jim.Pirzyk 2001-02-25 19:24:47 UTC
> 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
>
Comment 10 Johan Karlsson freebsd_committer freebsd_triage 2001-02-25 19:39:01 UTC
State Changed
From-To: feedback->closed

truncate(1) solved the problem.
Comment 11 HATANO Tomomi 2001-11-07 15:30:56 UTC
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.