Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ut-sally!husc6!necntc!ames!oliveb!pyramid!prls!mips!dce From: dce@mips.UUCP (David Elliott) Newsgroups: comp.unix.questions Subject: Re: Suppressing the message of the day. Message-ID: <386@quacky.UUCP> Date: Wed, 13-May-87 10:31:40 EDT Article-I.D.: quacky.386 Posted: Wed May 13 10:31:40 1987 Date-Received: Sat, 16-May-87 04:25:52 EDT References: <15452@brunix.UUCP> Reply-To: dce@quacky.UUCP (David Elliott) Organization: MIPS Computer Systems, Sunnyvale, CA Lines: 68 In article <15452@brunix.UUCP> kbb@brunix.UUCP (Karl Berry.) writes: >Is it possible to suppress the printing of the message of the day at >login? (Aside from changing login.c, that is.) I'm on 4.2/4.3 bsd. >Please respond via mail. This request piqued my interest. I looked to see if there was a manual page for motd, and there wasn't (the information was in login(5)), so I thought I'd write one. This manual page also includes a neat idea that someone gave me a few years ago. This manual page is hereby placed in the public domain. ------------------------------------------------------- .TH MOTD 5 .SH NAME motd \- Message of the day .SH SYNOPSIS .B /etc/motd .SH DESCRIPTION The file \fB/etc/motd\fP is set up to contain information about the system. Some of the information is generated automatically. Specifically, the system identification line (the first line of the file) is generated at system startup time by commands in \fB/etc/rc.local\fP. Other information is provided by the systems staff, and includes items such as scheduled down time, information about new software and hardware, and other timely announcements. .PP When a user logs in to the system via \fIlogin(1)\fP, the contents of \fB/etc/motd\fP is printed, unless the file \fB.hushlogin\fP exists in their home directory. The presence of \fB.hushlogin\fP will also suppress the ``Last login...'' message (there is no way to just suppress one or the other). .PP Though intended for accounts such as \fIuucp\fP, for which the information is of no value, the \fB.hushlogin\fP file can be useful. For example, users with terminals that clear the screen upon initialization can create \fB.hushlogin\fP and change their startup files to print the contents of the file after terminal initialization has been done. .PP Another interesting idea is to create the files \fB.hushlogin\fP and \fB.motd\fP in your home directory and place the following command lines in the startup files (\fB.login\fP for \fIcsh(1)\fP users, \fB.profile\fP for \fIsh(1)\fP users): .IP .nf find /etc/motd -newer $HOME/.motd -exec cat {} \; touch $HOME/.motd .fi .PP This will cause the contents of the message of the day file to be printed only when \fB/etc/motd\fP is modified. .SH FILES .TP 25 .I /etc/motd The message of the day file .TP 25 .I /etc/rc.local System startup file .TP 25 .I $HOME/.hushlogin File to suppress printing of message of the day .SH "SEE ALSO" csh(1), find(1), login(1), sh(1). -- David Elliott {decvax,ucbvax,ihnp4}!decwrl!mips!dce