Return to BSD News archive
Newsgroups: comp.unix.bsd Path: sserve!manuel!munnari.oz.au!uunet!caen!destroyer!ais.org!lsloan From: lsloan@ais.org (Lance Sloan) Subject: The find not-operator Message-ID: <BrG8o9.Eq6@ais.org> Organization: UMCC Date: Wed, 15 Jul 1992 21:21:43 GMT Lines: 14 I have several files in my home directory called testfile, I want to delete all of them except for the one located in my bin subdirectory. As a test, I tried to print the ones to be deleted first, but I'm having problems using find's not-operator. Her's what I tried: find . -name 'testfile' -a \!-name 'bin/testfile' -print This causes various error messages depending on the location of "!". My manual doesn't give an example of using "!". Maybe I'm doing the whole thing wrong. Any help is greatly appreciated. Lance Sloan lsloan@umcc.ais.org