find / rm corrupting memory

Roy Marples roy at marples.name
Fri Jan 25 15:09:36 UTC 2008


Hi List.

I'm trying to track down a memory corruption when using the following 

/tmp/bb $ touch a b
/tmp/bb $ find . -type f -exec rm -rf -- {} \;
/tmp/bb $ touch a b c
/tmp/bb $ find . -type f -exec rm -rf -- {} \;
rm: invalid option -- 
BusyBox v1.9.0 (2008-01-25 14:43:46 GMT) multi-call binary

Usage: rm [OPTION]... FILE...

Remove (unlink) the FILE(s). You may use '--' to
indicate that all following arguments are non-options.

Options:
	-i	Always prompt before removing each destination
	-f	Remove existing destinations, never prompt
	-r,-R	Remove the contents of directories recursively

/tmp/bb $ 

This doesn't happen all the time either, just to make matters worse.
It does seem though that the more files -exec works on, the higher
chance of this happening.

Interestingly, it appears to be just affected with builtin commands as
find . -type f -exec /bin/rm -rf -- {} \;
works just fine.

Any pointers, or more information I can give to fix this are welcome :)

Thanks

Roy




More information about the busybox mailing list