All of lore.kernel.org
 help / color / mirror / Atom feed
From: Willy Tarreau <w@1wt.eu>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: Marc Perkel <mperkel@yahoo.com>, linux-kernel@vger.kernel.org
Subject: [OT] Re: The vi editor causes brain damage
Date: Sun, 19 Aug 2007 09:21:36 +0200	[thread overview]
Message-ID: <20070819072135.GQ6002@1wt.eu> (raw)
In-Reply-To: <46C7EE0A.2030601@gmail.com>

On Sun, Aug 19, 2007 at 09:15:22AM +0200, Jiri Slaby wrote:
> Marc Perkel napsal(a):
> > Let me give you and example of the difference between
> > Linux open source world brain damaged thinking and
> > what it's like out here in the real world.
> > 
> > Go to a directory with 10k files and type:
> > 
> > rm *
> > 
> > What do you get?
> > 
> > /bin/rm: Argument list too long
> 
> What does this have to do with rm command?

Nothing, and no more with linux development. Marc confuses shell and rm.
Under DOS, when he types "del *", the shell calls the builtin function
"del" and passes it only one argument "*". The del function is then
responsible for iterating through the files using getfirst/getnext.

This is also why mostly only builtin shell commands support "*", while
most external commands do not support it, since they have to re-implement
the same code to iterate through the files (try "debug c*.com", it will
not work).

Under unix, the shell resolves "*" and passes the 10000 file names to
the "rm" command. Now, execve() may fail because 10000 names in arguments
can require too much memory. That's why find and xargs were invented!

The solution is easy : find . -maxdepth 1 | xargs rm

So this has nothing to do with rm, nor with rm being open-source, and
even less with rm being written with vi, and Marc's rant is totally
wrong and off-topic. Maybe he was drunk when posting, or maybe someone
used his keyboard to make him look like a complete fool. Or maybe he
really is.

Willy
(please do not follow up on this OT thread, responses to /dev/null)


  reply	other threads:[~2007-08-19  7:30 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-19  5:20 The vi editor causes brain damage Marc Perkel
2007-08-19  6:15 ` Al Viro
2007-08-19  6:29   ` Marc Perkel
2007-08-19  4:24     ` hotmetal
2007-08-19 13:07       ` Marc Perkel
2007-08-19  7:15 ` Jiri Slaby
2007-08-19  7:21   ` Willy Tarreau [this message]
2007-08-19 12:31     ` [OT] " Benny Amorsen
2007-08-19 12:39       ` Paolo Ornati
2007-08-19 13:07         ` variable length argument support (was: [OT] Re: The vi editor causes brain damage) Jan Engelhardt
2007-08-19 14:40           ` Paolo Ornati
2007-08-19 13:22     ` The vi editor causes brain damage Marc Perkel
2007-08-19 13:33       ` Willy Tarreau
2007-08-19 14:06       ` Jose Celestino
2007-08-19 14:48       ` Paolo Ornati
2007-08-19 15:32         ` Marc Perkel
2007-08-19 17:32       ` Arjan van de Ven
2007-08-19 23:03       ` Michael Tharp
2007-08-20  1:55         ` Casey Dahlin
2007-08-19 13:55     ` [OT] " Torsten Duwe
2007-08-19 13:08   ` Marc Perkel
2007-08-19 20:14 ` Valdis.Kletnieks

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070819072135.GQ6002@1wt.eu \
    --to=w@1wt.eu \
    --cc=jirislaby@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mperkel@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.