Re: rm - Arguments too long

From: Jens.Toerring@physik.fu-berlin.de
Date: 04/22/03


From: Jens.Toerring@physik.fu-berlin.de
Date: 21 Apr 2003 23:33:36 GMT

In comp.unix.misc cljlk <cljlk@hotmail.com> 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?

If it's just a question of having that many files in the directory
that the argument list from typing 'rm *' would exceed some system
specific length you might have more success when using xargs(1).
But when already waited for three days on a "rm -r" I would start
looking out for a loop, i.e. that a subdirectory contains a link
to itself or to some higher level directory.

                                   Regards, Jens

-- 
      _  _____  _____
     | ||_   _||_   _|        Jens.Toerring@physik.fu-berlin.de
  _  | |  | |    | |
 | |_| |  | |    | |          http://www.physik.fu-berlin.de/~toerring
  \___/ens|_|homs|_|oerring


Relevant Pages

  • Re: rm - Arguments too long
    ... > can I have other alternation option to remove the directory? ... specific length you might have more success when using xargs. ... looking out for a loop, i.e. that a subdirectory contains a link ... to itself or to some higher level directory. ...
    (comp.unix.solaris)
  • Re: rm - Arguments too long
    ... > can I have other alternation option to remove the directory? ... specific length you might have more success when using xargs. ... looking out for a loop, i.e. that a subdirectory contains a link ... to itself or to some higher level directory. ...
    (comp.unix.admin)