bug-fileutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fileutils: inconsistent behaviour stripping / from end of filenames


From: Paul Eggert
Subject: Re: fileutils: inconsistent behaviour stripping / from end of filenames
Date: Thu, 13 Sep 2001 10:27:00 -0700 (PDT)

> Date: Thu, 13 Sep 2001 09:18:37 +0100 (BST)
> From: Edward Avis <address@hidden>
> 
> What does POSIX say about 'rm -r FOO' and 'rm -r FOO/'?

If FOO is a symbolic link to a directory, then POSIX 1003.1-200x d7
says 'rm -r FOO' removes only the link FOO, and 'rm -r FOO/' removes
only the directory FOO/ (and all files underneath it).  This relies on
the fact that rmdir("FOO/") removes the directory FOO/ (assuming it is
empty).

> If DOUGAL is a directory, then 'rm -r DOUGAL', 'rm -r DOUGAL/', 'rm
> -r DOUGAL//' and so on should all work.

That's right.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]