From owner-freebsd-questions Fri Jul 10 23:43:14 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA03420 for freebsd-questions-outgoing; Fri, 10 Jul 1998 23:43:14 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from freebie.lemis.com (freebie.lemis.com [139.130.136.133] (may be forged)) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA03415 for ; Fri, 10 Jul 1998 23:43:10 -0700 (PDT) (envelope-from grog@freebie.lemis.com) Received: (from grog@localhost) by freebie.lemis.com (8.9.0/8.9.0) id QAA25963; Sat, 11 Jul 1998 16:12:22 +0930 (CST) Message-ID: <19980711161222.E23241@freebie.lemis.com> Date: Sat, 11 Jul 1998 16:12:22 +0930 From: Greg Lehey To: "CA01 Jewell Christopher G. RM3" Cc: FreeBSD Questions Subject: Re: makeinf an executable command in Unix References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1i In-Reply-To: ; from CA01 Jewell Christopher G. RM3 on Fri, Jul 10, 1998 at 08:13:54PM -1000 WWW-Home-Page: http://www.lemis.com/~grog Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Please don't send questions like this to -hackers. That list is for in-depth discussion of FreeBSD topics. This one belongs in -questions. On Friday, 10 July 1998 at 20:13:54 -1000, CA01 Jewell Christopher G. RM3 wrote: > I am trying to make a cleanup routine for my hp-ux system. I made a file > with the simple command > find / -name core -print > > I saved it as .cleanup Well, firstly it's unlikely that you'll find any files called core. FreeBSD prepends the name of the program to a core file, so you're more likely to find something like foobar.core. You can do this by changing your command to: find / -name "*.core" | xargs rm -f You don't need the -print command, it's implicit. On the other hand, you probably want to do more than print them, so in this example I've shown you how to remove them. > everytime i execut it with > . .cleanup > command it gives me Permission denied on several directories. Can anyon > ehelp me out here? Sure. This is a feature, not a bug. You don't have access to those directories. If you run it as root, you should be fine, unless the directories in question are on another machine to which you don't have root access, in which case they're still a feature, not a bug. Greg -- See complete headers for address and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message