--- Rahul Sundaram <sundaram@xxxxxxxxxx> wrote:
Hi
...
[root@localhost .Trash]# rm * -rf bash: /bin/rm: Argument list too long [root@localhost .Trash]#
ouch, heh.
http://www.gnu.org/software/coreutils/faq/coreutils-faq.html#Argument-list-too-long
regards Rahul
Try switching to root, go to the .Trash folder and use
#: rm -rdf *
because remember that the "r" is for recursive action,
the "d" for folder(s), and "f" tells shell to continue
none-interactively. So, you'll probably need to use
"d" so that the all files and folders will be deleted
successfully.
I believe this should work.
Why is that? The original problem was that the argument list of "rm" was too long, which was because the shell expanded the glob "*" to an overly long list of filenames. The command you suggest does exactly the same, and will not help. And the "d" option isn't necessary either - non-empty directories shouldn't be unlinked (it's likely to cause filesystem corruption if indeed it's supported at all), and that's what the "d" option does. "rm -rf" should be quite sufficient for recursive directory deletion.
Paul.