newfile(1)

newfile - perform file-creation tasks for printer scripts

Showing IRIX 6.5.30 (default release). Last changed in IRIX 6.5.15.

     NAME
          newfile - perform file-creation tasks for printer scripts

     SYNOPSIS
          /usr/etc/appletalk/newfile [ -d ] [ -n ] [ -s size ]
                 [ -f name ] [ -p ptr ] [ -x sfx ] dir
          /usr/etc/appletalk/newfile -b file
          /usr/etc/appletalk/newfile -a file

     DESCRIPTION
          The newfile program creates a new file with the prefix name
          (default:  out) in the directory dir, but waits until there
          is enough available free disk space in the directory.  The
          actual file created will have the pathname dir/name###sfx,
          where ### is an optional unique three-digit HEX number; i.e.
          newfile will not overwrite an existing file.  There is no
          default sfx. The final complete pathname will be written on
          standard output.

          If the -d argument is given, newfile restricts the last
          component of the pathname to DOS limitations (all upper
          case, 8.3 characters).  The ptr argument specifies a print
          queue the file is being made for, and newfile reads a number
          of options from the printcap(5) entry for the queue (see
          below).

          Newfile waits until the filesystem containing dir has at
          least size bytes (default: 524288) available space.  The
          directory dir will also be checked for the file minfree,
          which can contain a number of Kilobytes of additional
          freespace that newfile will wait for before creating the new
          file.  If newfile has to wait to create a new file, it will
          report the delay to the AppleTalk log,
          /usr/adm/appletalk/at_log.  It will also report delays, as
          well as success to an existing status file in the current
          directory.  It will not create the status file.

          If the -n argument is given, newfile will not actually
          create the file, will not attempt to check for freespace,
          and will not write any status messages.  It will simply
          generate a filename based on all the parameters and write
          the result to standart output.  In this mode, it is not
          necessary to supply a dir.

          The newfile program performs two additional tasks:  with the
          -b option, it will print the size of file in bytes.  With
          the -a option, it will print the age of file in seconds past
          its modification time.

          The following table shows the items from ptr's printcap(5)
          entry that affect filename generation:
          Key Type     What it controls
          CR  string   If present, sets the ``Creator'' AppleShare attribute of
                       a created file to the first 4 characters of the string.
          dn  boolean  Equivalent to the -d option
          sx  string   Sets the sfx string (can be overridden with -x option)
          TY  string   If present, sets the ``Type'' AppleShare attribute of a
                       created file to the first 4 characters of the string.
          xn  boolean  Causes the unique numbers to be inserted into the
                       filename regardless of whether they're needed.

     DIAGNOSTICS
          Newfile exits with status 1 when it cannot read a file, or
          if command-line options have the wrong syntax.  It exits
          with status 2 if it cannot create the requested new file.

     FILES
          current_working_directory/status
               printer status is written here, if it exists

          /var/adm/appletalk/at_log
               delays waiting for free space are reported here.