Solved

rm - The parameter list is too long.

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
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.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

840 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