SUMMARY: non-interactive newfs

From: Christopher L. Barnard <cbar44_at_tsg.cbot.com>
Date: Tue Feb 11 2003 - 16:04:28 EST
I asked:

> I want to have a newfs done from cron.  However, from reading the man 
> page and trying different options, it appears that newfs always requires
> user input.  Has anyone successfully done a newfs (or mkfs I guess) on
> a unix file system without a user prompt?

The answer:

echo y | /usr/sbin/newfs /dev/dsk/cXdXtXsX

Some people also suggested using the Gnu binary "yes".  Others pointed
out that newfs will not send interactive questions if there is no tty.
Some other people talked about using expect, but I was hoping that I
wouldn't have to do something that complicated.  Some folks use mkfs, the
underlying command that newfs calls.  And finally, some folks questioned
the sanity of wanting a newfs in cron.  ;^)

Thanks to:

jim.malloy@convergys.com
Marty Davis <MDavis2@lgc.com>
Kevin Korb <kmk@sanitarium.net>
Sean Berry <berry@housebsd.org>
Adam Ronthal <aronthal@cirba.com>
JESSE CARROLL <jesse-carroll@usa.net>
Steve Maher <steve@marzconsulting.com>
"Broun, Bevan" <brounb@adi-limited.com>
"TRUCKS, JESSE (SBCSI)" <jt9873@sbc.com>
Dave Lowenstein <dlowenst@mail.sdsu.edu>
LINDA S GEE <u4imhlsg@crrel.usace.army.mil>
"Thomas M. Payerle" <payerle@physics.umd.edu>
Espen Martinsen <Espen.Martinsen@mnemonic.no>
"Hsu, Cheng (Consultant)" <CHsu@us.nomura.com>
Kevin Buterbaugh <Kevin.Buterbaugh@lifeway.com>
Justin Stringfellow <js70062@ms-egmp02-01.UK.Sun.COM>
Rierson Robert Civ OC-ALC/MASLA <Robert.Rierson@tinker.af.mil>

+-----------------------------------------------------------------------+
| Christopher L. Barnard         O     When I was a boy I was told that |
| cbarnard@tsg.cbot.com         / \    anybody could become president.  |
| (312) 347-4901               O---O   Now I'm beginning to believe it. |
| http://www.cs.uchicago.edu/~cbarnard                --Clarence Darrow |
+----------PGP public key available via finger or PGP keyserver---------+
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Tue Feb 11 16:09:17 2003

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:03 EST