Re: rm - Arguments too long

From: K Stahl (ktsahl_at_yahoo.com)
Date: 04/25/03

  • Next message: Rich Teer: "Re: rm - Arguments too long"
    Date: Fri, 25 Apr 2003 21:47:12 GMT
    
    

    Jan Reilink wrote:
    >
    > cljlk wrote:
    > > I use rm -r directory, it hang for 3 days, it still could not
    > > delete the directory. Thus I cd directory and rm *, I got
    > > "Arguments too long". How do I delete files? A
    > > can I have other alternation option to remove the directory?
    > > Thanks
    > >
    >
    > 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?

    Why not just:

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


  • Next message: Rich Teer: "Re: rm - Arguments too long"

    Relevant Pages

    • Re: rm - Arguments too long
      ... Jan Reilink wrote: ... > cljlk wrote: ... >> can I have other alternation option to remove the directory? ... What happens if there is an embedded space in a file name? ...
      (comp.unix.solaris)
    • Re: rm - Arguments too long
      ... Jan Reilink wrote: ... > cljlk wrote: ... >> can I have other alternation option to remove the directory? ... What happens if there is an embedded space in a file name? ...
      (comp.unix.admin)
    • Re: rm - Arguments too long
      ... cljlk wrote: ... > can I have other alternation option to remove the directory? ... Dutch Security Information Network ...
      (comp.unix.admin)
    • Re: rm - Arguments too long
      ... cljlk wrote: ... > can I have other alternation option to remove the directory? ... Dutch Security Information Network ...
      (comp.unix.solaris)
    • Re: rm - Arguments too long
      ... cljlk wrote: ... > can I have other alternation option to remove the directory? ... Dutch Security Information Network ...
      (comp.unix.misc)

  • Quantcast