[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fileutils: inconsistent behaviour stripping / from end of filenames
From: |
Jim Meyering |
Subject: |
Re: fileutils: inconsistent behaviour stripping / from end of filenames |
Date: |
Thu, 13 Sep 2001 19:36:07 +0200 |
User-agent: |
Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.0.106 |
Paul Eggert <address@hidden> wrote:
>> 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.
Doesn't POSIX require `rm -r dir/'
to be treated just like `rm -r dir/.' ?
The latter gets an error with GNU rm:
$ rm -r dir/.
rm: cannot remove `.' or `..'
[Exit 1]
- Inconsistent behaviour stripping / from end of filenames, Edward Avis, 2001/09/12
- fileutils: inconsistent behaviour stripping / from end of filenames, Jim Meyering, 2001/09/12
- Re: fileutils: inconsistent behaviour stripping / from end of filenames, Edward Avis, 2001/09/12
- Re: fileutils: inconsistent behaviour stripping / from end of filenames, Paul Eggert, 2001/09/12
- Re: fileutils: inconsistent behaviour stripping / from end of filenames, Edward Avis, 2001/09/13
- Re: fileutils: inconsistent behaviour stripping / from end of filenames, Paul Eggert, 2001/09/13
- Re: fileutils: inconsistent behaviour stripping / from end of filenames,
Jim Meyering <=
- Re: fileutils: inconsistent behaviour stripping / from end of filenames, Paul Eggert, 2001/09/13
- Re: fileutils: inconsistent behaviour stripping / from end of filenames, Jim Meyering, 2001/09/14
- Re: fileutils: inconsistent behaviour stripping / from end of filenames, Paul Eggert, 2001/09/14
- Re: fileutils: inconsistent behaviour stripping / from end of filenames, Jim Meyering, 2001/09/14