Solved

rm - The parameter list is too long.

Posted on 2006-10-30
4
715 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Adapt this command to show who installed 29 106
while loop over for loop 7 93
wait notify demo infinite loop 3 96
ShiftLeft challenge 21 76
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

920 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now