• Welcome to Web Hosting Community Forum for Webmasters - Web hosting Forum.
 

Recommended Providers


Jetpack
Fully Managed WordPress Hosting
lc_banner_leadgen_3
Fully Managed WordPress Hosting

WordPress Theme

WordPress Hosting Divi WordPress Theme
WPZOOM

Forum Membership

Forum Membership

/bin/rm: Argument list too long

Started by HRamesh, October 16, 2008, 10:22:11 PM


WordPress Hosting


HRamesh

Hi,

I am getting /bin/rm: Argument list too long error while deleting files using below command:

rm -rf somenane*

Any help would be appreciated.

Ramesh

Kailash

It seems that the total number of files are high. You can check it using the following command:

ls -l | wc -l

Try to delete in a batch (500/1000 files) at a time.

Kailash

jantillon

#2
If you are absolutely sure that you want to remove everything in the directory use xargs.  

find . -name '*' | xargs rm

Or add a filestring to the wildcard

hmb-willem

You can also remove the files in alphabets order.