This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: rm seems to fail
On 1/13/09, Mark J. Reed <markjreed@gmail.com> 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@w2 ~
$ rm -v goo/foo
rm: remove write-protected regular empty file `goo/foo'? y
removed `goo/foo'
dz@w2 ~
$ echo $?
0
dz@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/