• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 779
  • Last Modified:

rm - The parameter list is too long.

I have a folder wih approx 100,000 XML files  - and I need to delete them but it's coming up with "The parameter list is too long."

how can I do this?


there are a few other files with different extensions so I can; just delete the folder I need to just delete the XML files
0
gaz1000
Asked:
gaz1000
  • 2
1 Solution
 
ozoCommented:
find . -name '*.xml' -print | xargs rm
0
 
ravenplCommented:
ozo's removes all xmls from this and all subdirs, which may be not what You want...
if You have gnu find
find -maxdepth 1 -type f -name '*.xml' | xargs rm -vf
if no
ls -A -1 | grep "\.xml$" | xargs rm -vf
0
 
gaz1000Author Commented:
Ok I've used this but it's coming up with ls -A -1 | grep "\.xml$" | xargs rm -vf

rm: Not a recognized flag: v
Usage: rm [-firRe] [--] File...
0
 
ravenplCommented:
then go with simple 'rm -f'
-v stands for verbose (shows removed files) but seems like Your rm does not support it...

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now