Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ newsaux(8) — Dell System V Release 4 Issue 2.2

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

df(1)

uucp(1)

ls(1)

ctime(3)

getdate(3)

hostname(1)

grep(1)

news(5)

expire(8)

newsbatch(8)

rnews(8)

newsmaint(8)



NEWSAUX(8)                UNIX System V(13 Jan 1990)                 NEWSAUX(8)


NAME
      spacefor - check available space for news
      queuelen - get length of outbound-news uucp queues
      sizeof - get size of file(s) for news
      ctime, getdate - convert dates to and from internal representation for
      news
      newshostname - get host name for news
      gngp - search text using a newsgroup pattern
      canonhdr - extract header and canonicalize case in header keywords
      newslock - do locking for news

SYNOPSIS
      /usr/dell/cnews/newsbin/spacefor filesize location [ site ]
      /usr/dell/cnews/newsbin/queuelen site
      /usr/dell/cnews/newsbin/sizeof file ...
      /usr/dell/cnews/newsbin/ctime [ -u ] decimaldate
      /usr/dell/cnews/newsbin/getdate printabledate
      /usr/dell/cnews/newsbin/getabsdate absolute-printable-date
      /usr/dell/cnews/newsbin/newshostname
      /usr/dell/cnews/newsbin/gngp [ -a ] [ -r ] ngpattern file ...
      /usr/dell/cnews/newsbin/canonhdr [ file ] ...
      /usr/dell/cnews/newsbin/newslock locktemp lockname

DESCRIPTION
      These programs are minor utilities used by various parts of C News.

      Spacefor determines how many files of size filesize can fit in location
      (incoming, articles, control, archive, or outbound to site) without
      cramping things unduly.  The precise locations of these places, and how
      low space gets before it is unduly cramped, are site-specific.  Spacefor
      invokes df(1) to determine the available space.

      Queuelen reports how many news batches uucp has queued up for site.

      Sizeof reports the total number of bytes in the file(s).  (This may seem
      redundant with ls -l, but the format of ls -l varies between systems and
      sizeof looks after all that.)

      Ctime, getdate and getabsdate convert dates in human-readable form to
      (getdate and getabsdate) and from (ctime) decimal ASCII representations
      of Unix's internal integer dates.  Their functionality resembles that of
      their namesakes in the C library.  getabsdate parses only absolute dates,
      not relative dates.  Under -u, ctime will print GMT instead of local
      time.

      Newshostname reports the name of this system for news purposes.  This may
      differ from the name of the particular CPU it is run on; a cluster of
      CPUs sharing a filesystem tree would all have the same newshostname name.
      Typically newshostname gets the name from /usr/dell/cnews/lib/whoami;
      failing that, it consults various other possible sources (e.g. the
      hostname command).



10/89                                                                    Page 1







NEWSAUX(8)                UNIX System V(13 Jan 1990)                 NEWSAUX(8)


      Gngp resembles grep except that its search is based on newsgroup patterns
      (e.g. `comp', which matches `comp', `comp.lang', `comp.lang.c', ...;
      `comp,!comp.lang.c' which matches `comp' and `comp.lang' but not
      `comp.lang.c'; etc.).  Gngp prints only the line(s) that contain a
      substring that matches the ngpattern.  Normally the substring must run
      from a point in the line to its end.  If the -a flag is given, the
      eligible substrings start at the beginning of the line and end at white
      space or the end of the line.  The -r flag reverses the inputs, with
      patterns coming from the file and the argument taken as the line(s).

      Canonhdr takes the concatenation of its input file(s) (standard input if
      none) as an article, and outputs the header from the article with header
      keywords canonicalized for easier processing.  Canonicalization forces
      all alphabetics to lower case except the first letter of each (hyphen-
      separated) word in the keyword, which is forced to upper case.  (One
      exception:  ``Message-ID'' is the canonical form of [e.g.] ``message-
      id''.)

      Newslock makes a link named lockname to the file locktemp, and returns
      exit status 0 for success, 1 if the link could not be made (typically
      because lockname already existed).  This is used for shell-file locking
      in C News.  It is a subset of ln(1) except that (a) no error messages are
      ever produced and (b) the link is guaranteed to fail if lockname already
      exists.  (Some brain-damaged versions of ln helpfully remove lockname in
      that case, making them useless for locking.)

FILES
      /usr/spool/uucp/*       uucp queues
      /usr/dell/cnews/lib/whoaminews host name
      /usr/dell/cnews/lib/L.* lock temporaries
      /usr/dell/cnews/lib/LOCK*lock files

SEE ALSO
      df(1), uucp(1), ls(1), ctime(3), getdate(3), hostname(1), grep(1),
      news(5), expire(8), newsbatch(8), rnews(8), newsmaint(8)

HISTORY
      Written at U of Toronto by Henry Spencer and Geoff Collyer.

BUGS
      Spacefor and queuelen are unfortunately somewhat system-specific, since
      df output and uucp file layout vary between different versions.

      Queuelen probably ought to count bytes rather than batches, but that
      would make its system-dependency even worse.

      The need for sizeof and newslock is a botch.







Page 2                                                                    10/89





Typewritten Software • bear@typewritten.org • Edmonds, WA 98026