Re: rm - Arguments too long

davehinz_at_spamcop.net
Date: 04/26/03

  • Next message: Jan Reilink: "Re: rm - Arguments too long"
    Date: 26 Apr 2003 05:24:42 GMT
    
    

    In comp.unix.admin K Stahl <ktsahl@yahoo.com> wrote:
    > Jan Reilink wrote:

    >> I haven't seen this answer (yet), it might take a while though:
    >> $ cd <directory>
    >> $ ls -1 | while read line; do (/bin/rm $line); done

    > What happens if there is an embedded space in a file name?

    Short answer: It doesn't work right for those files.
    Real answer: smack whoever did that.

    > Why not just:

    > while read Buff;do /bin/rm "$Buff";done<$(ls -1);

    Maybe I'm missing why rm -rf dirname won't work here?

    Dave Hinz


  • Next message: Jan Reilink: "Re: rm - Arguments too long"

    Relevant Pages

    • Re: rm - Arguments too long
      ... In comp.unix.admin K Stahl wrote: ... > Jan Reilink wrote: ... Real answer: smack whoever did that. ... Dave Hinz ...
      (comp.unix.solaris)
    • Re: rm - Arguments too long
      ... In comp.unix.admin K Stahl wrote: ... > Jan Reilink wrote: ... Real answer: smack whoever did that. ... Dave Hinz ...
      (comp.unix.admin)
    • Re: rm - Arguments too long
      ... Jan Reilink wrote: ... > K Stahl wrote: ... >> What happens if there is an embedded space in a file name? ... it's wise to keep that in mind. ...
      (comp.unix.misc)