Computing.Net > Forums > Unix > The parameter list is too long

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

The parameter list is too long

Reply to Message Icon

Name: roger
Date: August 1, 2002 at 15:01:39 Pacific
Comment:

I want to perform a simple rm command on all the files (#600) in a particular directory. When I try rm * I get the error: The parameter list is too long. I've tried to use xargs -n10000 rm but now my PC is is just sitting there blinking at me. Help?



Sponsored Link
Ads by Google

Response Number 1
Name: Frank
Date: August 1, 2002 at 23:47:01 Pacific
Reply:

Hi,

try
find . -perm 600 -exec rm {} \;

if this not work try
for i in * ; do
rm $i
done

No RISK no fun
Frank



0

Response Number 2
Name: joe
Date: August 2, 2002 at 09:38:41 Pacific
Reply:

or ...... use xargs


0

Response Number 3
Name: joe
Date: August 2, 2002 at 09:43:03 Pacific
Reply:

I guess an example would be helpful .. : )

A typical usage is to remove a long list of filenames in a directory with rm *, and it fails with "parameter list is too long" ...
so, try the following:

echo *|xargs rm


0

Response Number 4
Name: roger
Date: August 2, 2002 at 16:06:24 Pacific
Reply:

find worked great, Thanks!


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: The parameter list is too long

The parameter list is too long (AIX) www.computing.net/answers/unix/the-parameter-list-is-too-long-aix/2584.html

Parameter list is too long for tar www.computing.net/answers/unix/parameter-list-is-too-long-for-tar/3876.html

paramer listing is too long www.computing.net/answers/unix/paramer-listing-is-too-long/5327.html