Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-Id: <4.3.1.2.20010320130940.022a7458@pop.ma.ultranet.com> X-Sender: lhall AT pop DOT ma DOT ultranet DOT com X-Mailer: QUALCOMM Windows Eudora Version 4.3.1 Date: Tue, 20 Mar 2001 13:13:21 -0500 To: "Primitive Guy" , cygwin AT cygwin DOT com From: "Larry Hall (RFK Partners, Inc)" Subject: Re: rm -r not working In-Reply-To: <200103201742.JAA00506@mail19.bigmailbox.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" At 12:42 PM 3/20/2001, Primitive Guy wrote: >I want to remove all my .class files in all sub-directories starting from /dev/classes. > >classes $ rm -r *.class >rm: cannot remove `*.class': No such file or directory > >There are no .class files in /dev/classes but there are certainly .class files in sub-directories of /dev/classes. > >what am I doing wrong? rm --help Usage: rm [OPTION]... FILE... Remove (unlink) the FILE(s). -d, --directory unlink directory, even if non-empty (super-user only) -f, --force ignore nonexistent files, never prompt -i, --interactive prompt before any removal -r, -R, --recursive remove the contents of directories recursively -v, --verbose explain what is being done --help display this help and exit --version output version information and exit The -r flag to rm removes the contents of the specified directory and the directory itself. It doesn't search out the file spec you specify and remove those recursively. You can use find to do that (in conjunction with rm) though. Larry Hall lhall AT rfk DOT com RFK Partners, Inc. http://www.rfk.com 118 Washington Street (508) 893-9779 - RFK Office Holliston, MA 01746 (508) 893-9889 - FAX -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple