Solved

rm - The parameter list is too long.

Posted on 2006-10-30
4
742 Views
Last Modified: 2013-12-26
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
Comment
Question by:gaz1000
  • 2
4 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 17832636
find . -name '*.xml' -print | xargs rm
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 17832738
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
 

Author Comment

by:gaz1000
ID: 17832763
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
 
LVL 43

Accepted Solution

by:
ravenpl earned 125 total points
ID: 17832796
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
In this post we will learn different types of Android Layout and some basics of an Android App.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question