NEWS(1,C) AIX Commands Reference NEWS(1,C)
-------------------------------------------------------------------------------
news
PURPOSE
Writes system news items to standard output.
SYNTAX
+--------+ +--------+
news ---| one of |---| |---|
| +----+ | +- item -+
+-| -a |-+ ^ |
| -n | +------+
| -s |
+----+
DESCRIPTION
The news command keeps you informed of news concerning the system. Each news
item is contained in a separate file in the directory /usr/news. Anyone having
read/write permission to this directory can create a news file.
If you run the news command without any flags, it displays every current file
in /usr/news, showing the most recent first. Or you can specify the items you
want displayed.
Each file is preceded by an appropriate header. To avoid reporting old news,
news stores a currency time. The news command considers your currency time to
be the modification time of the file named $HOME/.news_time. Each time you
read the news, the modification time of this file changes to that of the
reading. Only news item files posted after this time are considered current.
Pressing the INTERRUPT (Ctrl-C) key during the display of a news item stops the
display of that item and starts the next. Pressing this key again ends the
news command.
To run news each time you log in, include this line in your $HOME/.profile file
or in the system's /etc/profile:
news -n
FLAGS
-a Displays all news items, regardless of the currency time. The currency
time does not change.
Processed November 8, 1990 NEWS(1,C) 1
NEWS(1,C) AIX Commands Reference NEWS(1,C)
-n Reports the names of current news items without displaying their contents.
The currency time does not change.
-s Reports the number of current news items without displaying their names or
contents. The currency time does not change.
EXAMPLES
1. To display the items that have been posted since you last read the news:
news
2. To display all the news items:
news -a | pg
This command displays all the news items a page at a time ("| pg") whether
you have read them yet.
3. To list the names of the news items that you have not read yet:
news -n
Each name is a file in the directory /usr/news.
4. To display specific news items:
news newusers services
This command displays news about "newusers" and "services", which are names
listed by news -n.
5. To display the number of news items that you have not read yet:
news -s
6. To post news for everyone to read:
cp schedule /usr/news
This command copies the file "schedule" into the system news directory,
"/usr/news", to create the file "/usr/news/schedule". To do this you must
have write permission for "/usr/news".
FILES
/etc/profile System-wide profile.
/usr/news/* User news file.
$HOME/.news_time Contains user currency time.
RELATED INFORMATION
Processed November 8, 1990 NEWS(1,C) 2
NEWS(1,C) AIX Commands Reference NEWS(1,C)
See the following command: "pg."
See the profile file and environ special facility in AIX Operating System
Technical Reference.
Processed November 8, 1990 NEWS(1,C) 3