Pretty sure 'our' upstream rm (in a prior life) expressly prohibited -r on starting paths that contained .. members. Too many weirdo cases where you would get into trouble.
-- Jim -----Original Message----- From: busybox [mailto:[email protected]] On Behalf Of Ralf Friedl Sent: Wednesday, September 17, 2014 2:02 AM To: Gian Ntzik; [email protected] Subject: Re: rm -r fails to delete entire hierarchy when path goes in and out of it Gian Ntzik wrote: > It seems that using rm -r with a path that goes into the hierarchy > intended for removal (and back up e.g. using dot-dots) fails to remove > the entire hierarchy. > > For example, > > $ mkdir -p /tmp/a/b/c > $ mkdir -p /tmp/a/e > $ rm -r /tmp/a/b/../../a > rm: can't remove 'a/b/../../a/e': No such file or directory > rm: can't remove 'a/b/../../a': No such file or directory GNU rm does this: $ mkdir -p /tmp/a/b/c /tmp/a/e $ rm -r /tmp/a/b/../../a rm: cannot remove '/tmp/a/b/../../a': No such file or directory In general I think it is not a good idea to pass such arguments to rm. _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
