From owner-freebsd-questions Sun Dec 26 14:30:29 1999 Delivered-To: freebsd-questions@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id 770E914A2F for ; Sun, 26 Dec 1999 14:30:26 -0800 (PST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.9.3/8.9.3) id QAA79827; Sun, 26 Dec 1999 16:30:22 -0600 (CST) (envelope-from dan) Date: Sun, 26 Dec 1999 16:30:22 -0600 From: Dan Nelson To: Chris Byrnes Cc: questions@FreeBSD.ORG Subject: Re: "yes" Message-ID: <19991226163022.A79675@dan.emsphone.com> References: <199912242005.OAA36145@shell.jeah.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <199912242005.OAA36145@shell.jeah.net>; from "Chris Byrnes" on Fri Dec 24 14:05:35 GMT 1999 X-OS: FreeBSD 4.0-CURRENT Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In the last episode (Dec 24), Chris Byrnes said: > What is the purpose of the "yes" command? I have not seen anything > useful that uses it. Its purpose is to replace the shell script while : ; do echo "yes" ; done (replace the string "yes" with any constant string you like). It's mainly used to provide input to interactive programs that you want to run from a script, to skip past "are you sure" -type prompts. > I have, however, seen people abuse it.. i.e: "yes poop > > your-drive-is-full" "dd if=/dev/zero of=your-drive-is-full bs=1m" or "cat /dev/zero > bigfile" would be quite a bit more efficient. > It's 700'd root right now, but that's not the point. If you have problems with people filling up filesystems, consider quotas. -- Dan Nelson dnelson@emsphone.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message