Paul Eggert <[EMAIL PROTECTED]> wrote:

> Currently 'rm -r dir' invokes three system calls for each directory
> entry removed, e.g. (on Debian stable):
>
>    lstat64("/proc/self/fd/5/output.0", ...)
>    access("tmp/autom4te.cache/output.0", W_OK)
>    unlink("/proc/self/fd/5/output.0")
>
> If we are root, the lstat and access calls aren't needed.  Also, if the
> directory entry is a symlink we needn't worry about access permissions.
>
> This can be worked around with 'rm -rf' but I kind of like using 'rm
> -r' when I'm root, since it's a bit more cautious and prints more
> diagnostics when there are trouble.  So I'd like 'rm -r' to be fast
> too.
>
> Here's a proposed patch.

Nice work.  Committed.
Thanks!


_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to