From owner-freebsd-questions Sat Aug 26 16:11:20 2000 Delivered-To: freebsd-questions@freebsd.org Received: from po4.wam.umd.edu (po4.wam.umd.edu [128.8.10.166]) by hub.freebsd.org (Postfix) with ESMTP id 92C8637B43C for ; Sat, 26 Aug 2000 16:11:15 -0700 (PDT) Received: from rac1.wam.umd.edu (rac1.wam.umd.edu [128.8.10.141]) by po4.wam.umd.edu (8.9.3/8.9.3) with ESMTP id TAA01563; Sat, 26 Aug 2000 19:11:10 -0400 (EDT) Received: from rac1.wam.umd.edu (localhost [127.0.0.1]) by rac1.wam.umd.edu (8.9.3/8.9.3) with SMTP id TAA02671; Sat, 26 Aug 2000 19:11:09 -0400 (EDT) Received: from localhost (gollucci@localhost) by rac1.wam.umd.edu (8.9.3/8.9.3) with ESMTP id TAA02667; Sat, 26 Aug 2000 19:11:09 -0400 (EDT) X-Authentication-Warning: rac1.wam.umd.edu: gollucci owned process doing -bs Date: Sat, 26 Aug 2000 19:11:09 -0400 (EDT) From: "Philip M. Gollucci" To: Evren Yurtesen Cc: freebsd-questions@FreeBSD.ORG Subject: Re: how to delete all files but the XYZ file. In-Reply-To: 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 the rm command supports regex expressions. ***************************************************************************** Philip M. Gollucci (p6m7g8) Web-site : http://www.p6m7g8.com E-mail : gollucci@wam.umd.edu Philip@p6m7g8.com Phone : 301.249.6261 (Home) 301. . (College) Major : Computer Science Electrical Engineering Minor : Classical & Jazz Performance Current Job : Co Science, Discovery, & the Universe Webmaster URL: http://www.sdu.umd.edu Resume : http://www.wam.umd.edu/~gollucci/resume.html ***************************************************************************** On Sat, 26 Aug 2000, Evren Yurtesen wrote: > Lets say I have 1230 files in one directory and I want to delete > all of the files but not the files named XYZ, XYA, XYB etc. > I want to do this from shell without using any file managers. (since > actually I need to do this from a script) > > Evren > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message