Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Deleting recursive directories

0 views
Skip to first unread message

Lew Pitcher

unread,
Oct 2, 2002, 1:30:59 PM10/2/02
to
On Wed, 02 Oct 2002 09:51:27 -0700, in alt.os.linux, Paul Lutus
<nos...@nosite.zzz> wrote:

>Todd Cary wrote:
>
>> Many thanks! I was looking at rmdir rather than rm. It appears that
>> rmdir can be viewed as a subset of rm.
>
>In any case, the object in question, a symbolic link, isn't a directory
>entry but a file entry.

????

Paul: Aren't you the one asserting most vehemently in comp.os.linux.setup
that only "file"s are files? Given your stance there, how can a symlink be
a "file entry"?

>"rm" is the correct choice primarily because the
>thing being deleted is not a directory.
>
>--
>Paul Lutus
>www.arachnoid.com
>


Lew Pitcher, Information Technology Consultant, Toronto Dominion Bank Financial Group
(Lew_P...@td.com)

(Opinions expressed are my own, not my employer's.)

Paul Lutus

unread,
Oct 2, 2002, 4:44:31 PM10/2/02
to
Lew Pitcher wrote:

> On Wed, 02 Oct 2002 09:51:27 -0700, in alt.os.linux, Paul Lutus
> <nos...@nosite.zzz> wrote:
>
>>Todd Cary wrote:
>>
>>> Many thanks! I was looking at rmdir rather than rm. It appears that
>>> rmdir can be viewed as a subset of rm.
>>
>>In any case, the object in question, a symbolic link, isn't a directory
>>entry but a file entry.
>
> ????
>
> Paul: Aren't you the one asserting most vehemently in comp.os.linux.setup
> that only "file"s are files? Given your stance there, how can a symlink be
> a "file entry"?

Why do you think I chose this particular wording? I thought this over before
posting, knowing someone might notice just what you did. The thing being
described is certainly not a file, nor is it a directory. It is an entry in
a filesystem directory (an inode), and in the original it's language
suitable for a nonspecialist. Think -- how would you describe a symlink or
an inode if you wanted to avoid specialized language?

There are plenty of things in the filesystem that are more like files than
they are like directories. Only directories are proper subject matter for
"rmdir," the rest are something else, things suitable to "rm".

In any case, why should I inflict the content of that dreadful thread on
this innocent poster? I really don't see the point. "rm" appears to be able
to delete anything (not true, but never mind). To the nonspecialist, this
means files as well as directories. And those things that "rm" can't (or
shouldn't) delete appear to be items of evidence against "everything is a
file," at least to me.

--
Paul Lutus
www.arachnoid.com

Lee Sau Dan

unread,
Oct 7, 2002, 3:01:47 AM10/7/02
to
>>>>> "Paul" == Paul Lutus <nos...@nosite.zzz> writes:

Paul> Why do you think I chose this particular wording? I thought
Paul> this over before posting, knowing someone might notice just
Paul> what you did. The thing being described is certainly not a
Paul> file, nor is it a directory. It is an entry in a filesystem
Paul> directory (an inode),

Not exactly. An inode is an entry in the fs's inode table, indexed by
the inode number. Each file has its own inode. What is in a
directory is just the pair (name, inode-number), not the inode itself.


Paul> There are plenty of things in the filesystem that are more
Paul> like files than they are like directories. Only directories
Paul> are proper subject matter for "rmdir," the rest are
Paul> something else, things suitable to "rm".

Or even more accurately, unlink(2).


Paul> In any case, why should I inflict the content of that
Paul> dreadful thread on this innocent poster? I really don't see
Paul> the point. "rm" appears to be able to delete anything (not
Paul> true, but never mind). To the nonspecialist, this means
Paul> files as well as directories. And those things that "rm"
Paul> can't (or shouldn't) delete appear to be items of evidence
Paul> against "everything is a file," at least to me.

Yeah. But this "a directory is not really a file" thing is so deep in
the unix design that it is not easy to change. There are OSes that
separate "files" from "directories". There, directories are just
lookup tables for name -> unique_file_id. They don't have to be
provided from the same machine where the files are actually stored.


--
Lee Sau Dan 李守敦(Big5) ~{@nJX6X~}(HZ)

E-mail: dan...@informatik.uni-freiburg.de
Home page: http://www.informatik.uni-freiburg.de/~danlee

0 new messages