[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 775
  • 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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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