Writes system news items to standard output.
news [ -a | -n | -s | Item ... ]
The news command writes system news items to standard output. This command keeps you informed of news concerning the system. Each news item is contained in a separate file in the /var/news directory. Most users run the news command followed by the -n flag each time they log in by including it in their $HOME/.profile file or in the system's /etc/profile file. Any user having write permission to this directory can create a news item. It is not necessary to have read permission to create a news item.
If you run the news command without any flags, it displays every current file in the /var/news file, showing the most recent first. This command, used with the -a flag, displays all news items. If you specify the -n flag, only the names of the unread news items are displayed. Using the -s flag displays the number of unread news items. You can also use the Item parameter to specify the files that you want displayed.
Each file is preceded by an appropriate header. To avoid reporting old news, the news command stores a currency time. The news command considers your currency time to be the date the $HOME/.news_time file was last modified. 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 sequence during the display of a news item stops the display of that item and starts the next. Pressing the Ctrl-C key sequence again ends the news command.
Note: News items can contain multibyte characters.
news
news -a | pgAll of the news items display a page at a time (| pg), regardless of whether you have read them yet.
news -nEach name is a file in the /var/news directory.
news newusers servicesThis command sequence displays news about newusers and services, which are names listed by the news -n command.
news -s
cp schedule /var/newsThis copies the schedule file into the system /var/news directory to create the /var/news/schedule file. To do this, you must have write permission to the /var/news directory.
/usr/bin/news | Contains the news command. |
/etc/profile | Contains the system profile. |
/var/news | Contains system news item files. |
$HOME/.news_time | Indicates the date the news command was last invoked. |
The /etc/security/environ file, profile file.