From owner-freebsd-questions Sun Jan 31 02:19:11 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA06457 for freebsd-questions-outgoing; Sun, 31 Jan 1999 02:19:11 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from eddie.silk.net (eddie.silk.net [204.244.76.245]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA06447 for ; Sun, 31 Jan 1999 02:19:07 -0800 (PST) (envelope-from eddie@eddie.silk.net) Received: (from eddie@localhost) by eddie.silk.net (8.9.1/8.9.1) id CAA56541; Sun, 31 Jan 1999 02:26:22 -0800 (PST) (envelope-from eddie) Date: Sun, 31 Jan 1999 02:26:21 -0800 (PST) From: Eddie Lawhead To: Oleg Kolobov cc: freebsd-questions@FreeBSD.ORG Subject: Re: a nice example In-Reply-To: <36B4381B.5F23418F@lib.tpu.ru> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Holy Crap!!! I had to try it....:) This should solve your problem: #!/bin/sh # Antitest while : do if [ -d test ]; then cd test else cd .. if [ -d test ]; then rm -rf test; else exit 0 fi fi done Very Cool..:) On Sun, 31 Jan 1999, Oleg Kolobov wrote: > Hi, > there is a nice example in SMM 4.4BSD documents (D. Ritchie "On the > Security of UNIX) > #!/bin/sh > while : > do > mkdir test; cd test > done > I have been executing the script for 5 min. > I can't delete directory - test!!! > I use command "rm -r ./test". No result. > I use script > #!/bin/sh > while : > do > if [ -n "$GO" ]; then > rm -rf test > cd .. > else > if [ -d test ]; then > cd test > else > GO=yes > fi > fi > done > No result. > Is there a nice anti_example? > > Thanks! > -- > > Oleg. > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Eddie H. Lawhead FreeBSD: The Power To Serve Kelowna, BC, Canada http://www.FreeBSD.org eddie@silk.net http://www.Silk.net =-=-=-=-=-=-= Enriched, V-Card, HTML Messages > /dev/null =-=-=-=-=-=-= To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message