news(1) news(1)
NAME
news - output news items
SYNOPSIS
news [option ...] [newsitems ...]
DESCRIPTION
news outputs news items from the system news pool /var/news; the most
recent items are output first.
OPTIONS
No option specified:
news outputs the contents of all the files residing in the direc-
tory /var/news which are more recent than the time at which news
was last called.
The news items are output on a last-in first-out basis (i.e. most
recent first).
Each item has an appropriate header.
When news is called for the first time, it creates a file named
.newstime in the calling user's home directory (as determined by
the $HOME variable). In subsequent calls news uses the time at
which this file was last accessed (the "currency" time) to select
the items to be displayed to the user. Only those items which are
more recent than this access time are output, i.e. only those
items more recent than the time news was last invoked.
Each time news is called, the access time of the .newstime file
is changed to the current system time.
-a (all) news outputs all news items, regardless of their currency.
If this option is set, the access time of the .newstime file is
not changed.
-n (names) news only outputs the names of the current news files,
not their contents. The access time of the .newstime file is not
changed.
-s (statistics) news outputs the number of current news items that
exist, without listing their file names or contents, and without
changing the access time of the .newstime file.
It is useful to include such an invocation of news in each user's
.profile file, or in the system's /etc/profile.
newsitems
newsitems designates the individual files from the /var/news
directory whose contents are to be output. More than one item may
be specified.
Page 1 Reliant UNIX 5.44 Printed 11/98
news(1) news(1)
newsitems not specified:
news outputs the contents of files residing in the /var/news
directory which are more recent than the time at which news was
last invoked.
Functionality
news displays the contents of individual news items one after the
other on the screen.
Output of an item can be stopped by hitting <DEL>. news then ter-
minates output of the current item and starts again with the next
item. If you press <DEL> twice in quick succession news aborts com-
pletely.
LOCALE
The LCMESSAGES environment variable governs the language in which
message texts are displayed.
The LCTIME environment variable governs the format of date and time
strings.
If LCMESSAGES or LCTIME is undefined or is defined as the null
string, it defaults to the value of LANG. If LANG is likewise unde-
fined or null, the system acts as if it were not internationalized.
The LCALL environment variable governs the entire locale. LCALL
takes precedence over all the other environment variables which affect
internationalization.
If any of the locale variables has an invalid value, the system acts
as if none of the variables were set.
Page 2 Reliant UNIX 5.44 Printed 11/98
news(1) news(1)
EXAMPLES
Example 1
To check if there are news items in the system news pool, you enter:
$ news -s
5 news items
Example 2
To list the names under which these items are stored, you enter:
$ news -n
news: minutes party safety important ignore
To display the file ignore on the screen, you enter:
$ news ignore | pg
important (harry) Mon Aug 12 14:24:19 1991
Curiosity killed the cat!
Check the file "important" for relevant news!
Your system administrator
FILES
/etc/profile
File executed by every login shell. This file is created by the
system administrator.
/var/news/*
News files.
$HOME/.newstime
File with information on the last invocation of news.
SEE ALSO
profile(4), environ(5).
Page 3 Reliant UNIX 5.44 Printed 11/98