Date: Wed, 12 Aug 98 16:41:26 +0200 From: Thierry.Herbelot@alcatel.fr To: romank@graphnet.com Cc: freebsd-questions@FreeBSD.ORG Subject: removing files Message-ID: <H000057c01776e2a@MHS> In-Reply-To: <35D195D9.CD9E1460@graphnet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello, what about : (under csh) foreach i (`ls | grep -v la.txt | grep -v foo.sh`) rm $i end ? TfH > Hi, > > Let's say I have a directory with la.txt and foo.sh and 6 million other > files. > > Can I issue a command that says: delete everything BUT la.txt and foo.sh > > > According to man rm there's no way to do it with that one. Is there an > alternative? > > Thanks, > > Roman > -- > Roman Katsnelson > UNIX Network Engineer > Graphnet, Inc. > > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?H000057c01776e2a>