Re: rm - Arguments too long

From: Rev. Don Kool (oldno7@comcast.net)
Date: 04/22/03


Date: Mon, 21 Apr 2003 18:58:40 -0400
From: "Rev. Don Kool" <oldno7@comcast.net>


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?

        There are as many different ways as there are admins, my friend. Two
that leap to mind would be to use the "find" command with an "-exec rm
{}" option. That would work but it would likely be slow. Depending on
the names of your files, you could attempt to delete them in blocks.
Something like "rm [A-L]*", "rm [M-Z]*", etc... These could be run in
parallel. Of course if you have all these files in there due to some
automatic naming convention that has boatloads of them starting with the
same letter, you'll have to get more creative with what you put in the
square brackets. Good luck.

> Thanks

        No problem.

                Hope this helps,
                        Don

-- 
***************************   Q: How many frenchmen does it take
* Rev. Don McDonald, SCNA *      to defend Paris?
* Baltimore, MD           *   A: No one knows, it's never been tried.
*************************** 
http://mywebpages.comcast.net/oldno7/TheFrench.mpg
Reluctant Yamaha YZF-R1 Owner


Relevant Pages

  • 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)
  • Re: rm - Arguments too long
    ... cljlk wrote: ... > can I have other alternation option to remove the directory? ... automatic naming convention that has boatloads of them starting with the ...
    (comp.unix.solaris)
  • Re: rm - Arguments too long
    ... cljlk wrote: ... > can I have other alternation option to remove the directory? ... automatic naming convention that has boatloads of them starting with the ...
    (comp.unix.admin)