X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Message-ID: <5520d94f0901131057o3cbb3915h95b824942d95be6c@mail.gmail.com> Date: Tue, 13 Jan 2009 10:57:11 -0800 From: "greenup greenup" To: cygwin AT cygwin DOT com Subject: Re: rm seems to fail In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <5520d94f0901130852l310a9dfdk9821c26458d8d5e AT mail DOT gmail DOT com> <5520d94f0901130901y66a7df50yca7e586998a3bea3 AT mail DOT gmail DOT com> <5520d94f0901130916l7669d8capa39587365237da4f AT mail DOT gmail DOT com> X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On 1/13/09, Mark J. Reed wrote: > On Tue, Jan 13, 2009 at 12:16 PM, greenup wrote: > > oh, I forgot to mention: right after doing the rm, the return code is > > success, even though it failed to actually remove the file. > rm with -f is silent about certain types of errors, usually of the > "file doesn't exist" variety. So that sounds like rm thinks that > > Is rm without -f able to remove goo/foo (after you confirm at the > prompt)? If not, does it generate an error indication? Nope. no error. Looking farther for an error, I tried to see if I could get more verbose, and found "-v". It seemed to just further indicate that rm thought it had done its job. dz AT w2 ~ $ rm -v goo/foo rm: remove write-protected regular empty file `goo/foo'? y removed `goo/foo' dz AT w2 ~ $ echo $? 0 dz AT w2 ~ $ ls -la goo total 0 drwxr-xr-x+ 2 dz mkgroup-l-d 0 Jan 13 08:10 . drwxrwx---+ 23 Administrators SYSTEM 0 Jan 13 10:01 .. -r-------- 1 dz mkgroup-l-d 0 Jan 13 08:18 foo obviously, LOTS AND LOTS of scripts and makefiles depend on rm -f. This is bad. (for me, at least) -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/