|
From: | Bob Proulx |
Subject: | bug#12339: Bug: rm -fr . doesn't dir depth first deletion yet it is documented to do so. |
Date: | Sun, 2 Sep 2012 21:53:52 -0600 |
User-agent: | Mutt/1.5.21 (2010-09-15) |
Linda Walsh wrote: > Now there seems to be a special check for "." and disallow it as a > rm target. But that was a safe and portable way to delete all contents. > ... > I would expect it to delete all but the current inode I'm parked on, and > for it -- either issue an error or silently ignore ... preferring 'DoWIMean' > versus 'technically'...as being more user friendly. > > Sides -- it normally does depth-first traversal --- since you can't delete > a dir with contents still in it -- so why different for '.'? +1. Feels like a bug to me. Workaround: find . -delete Bob
[Prev in Thread] | Current Thread | [Next in Thread] |