Path: utzoo!utgpu!watserv1!watmath!att!occrsh!uokmax!apple!usc!samsung!uunet!mcsun!ukc!reading!rosemary!ac1 From: ac1@rosemary.cs.reading.ac.uk (Andrew Cunningham) Newsgroups: comp.unix.wizards Subject: Re: SEX! or, how do I mail to a lot of unix users? Message-ID: <2362@onion.reading.ac.uk> Date: 3 Jun 90 11:42:33 GMT References: <900531083151.30e0b91a@Csa2.LBL.Gov> <11990@encore.Encore.COM> Sender: news@reading.ac.uk Reply-To: ac1@rosemary.cs.reading.ac.uk (Andrew Cunningham) Organization: Comp. Sci. Dept., Reading Univ., UK. Lines: 30 In article <11990@encore.Encore.COM> jdarcy@zelig.encore.com (Mostly Harmless) writes: >thermal%solgel.hepnet@CSA2.LBL.GOV: >> I would like to be able to send a mail message to all the users on > >The simplest way I can think of is: > > mail `awk -F: '{print $1;}' < /etc/passwd` > If all users home directories are in the same place (e.g. /users/ac1, /users/someone, /users/foo etc) then you can do cd /users; mail * At worst you might have to do this two or three times to get all users on the whole system. Remember that there will be a copy made of the message for EVERY user you send it to - which could amount to a lot of disk space! AndyC #include When in doubt, use brute force - Ken Thompson "Truly, the way of enlightenment is like unto half a mile of broken glass" -- Ignatious Cutwell, B. Mgc. (UU) ARPA: ac1%csug.cs.reading.ac.uk@{ucl-cs.arpa,nsfnet-relay.ac.uk} UUCP: ac1%csug.cs.reading.ac.uk@ukc.uucp /* one of these */ Internet: ac1%csug.cs.reading.ac.uk@cunyvm.cuny.edu /* must work! */ JANet: ac1@uk.ac.reading.csug.cs