Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!husc6!think!ames!ptsfa!ihnp4!inuxc!iuvax!bsu-cs!dhesi From: dhesi@bsu-cs.UUCP (Rahul Dhesi) Newsgroups: comp.unix.questions Subject: Re: .hushlogin Message-ID: <640@bsu-cs.UUCP> Date: Sun, 17-May-87 01:14:30 EDT Article-I.D.: bsu-cs.640 Posted: Sun May 17 01:14:30 1987 Date-Received: Sun, 17-May-87 11:46:18 EDT References: <7407@brl-adm.ARPA> Reply-To: dhesi@bsu-cs.UUCP (Rahul Dhesi) Organization: CS Dept, Ball St U, Muncie, Indiana Lines: 23 Summary: find /etc -name motd -newer .hushlogin \ -exec cat \; -a \ -exec touch .hushlogin \; In article <7407@brl-adm.ARPA> MARSELLE%gmr.com@RELAY.CS.NET writes: >The other day I read someone's suggestion to use a "make -f .hushlogin" >in the .login file to only print out /etc/motd when its last mod time >changes. [discussion of many variations of this, leading to:] >I think I'll switch to someone else's suggestion and try [something else.] Here is a solution I actually used for some years with 4.2BSD: find /etc -name motd -newer .hushlogin \ -a -exec cat /etc/motd \; \ -a -exec touch .hushlogin On the face of it this could be ineffeicient. But since /etc turns out to have no subdirectories (under 4.2BSD) it's actually pretty fast. Please check the syntax since I am quoting from memory. The real solution is: GET RID OF THAT /ETC/MOTD!!! Use a sensible one-time message utility like "msgs" (4.xBSD) or "news" (System V). -- Rahul Dhesi UUCP: {ihnp4,seismo}!{iuvax,pur-ee}!bsu-cs!dhesi