Divi WordPress Theme

/bin/rm: Argument list too long

Topic: /bin/rm: Argument list too long  (Read 10678 times)

Offline HRamesh

  • New Member
  • *
  • Posts: 34
  • iTrader: +0/-0
    • View Profile
/bin/rm: Argument list too long
« on: October 16, 2008, 10:22:11 PM »
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
VPS Hosting - AccuWebHosting

Offline Kailash

  • Web Hosting Master
  • *****
  • Administrator
  • Posts: 660
  • iTrader: +153/-0
    • View Profile
Re: /bin/rm: Argument list too long
« Reply #1 on: October 17, 2008, 01:00:16 AM »
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

Offline jantillon

  • Newbie
  • *
  • Posts: 1
  • iTrader: +0/-0
    • View Profile
Re: /bin/rm: Argument list too long
« Reply #2 on: July 23, 2010, 05:38:51 AM »
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
« Last Edit: July 23, 2010, 05:42:25 AM by jantillon »

hmb-willem

Re: /bin/rm: Argument list too long
« Reply #3 on: January 28, 2016, 01:57:38 PM »
You can also remove the files in alphabets order.
Shopify Divi WordPress Theme
Tags:

Free Directory list

Started by KailashBoard Search Engine optimization and Link Exchange

Replies: 27
Views: 13677
Last post August 13, 2020, 05:09:38 PM
by Sashaximana
Warning: array_keys(): The first argument should be an array

Started by HRameshBoard Forums and Content Management

Replies: 2
Views: 14415
Last post October 20, 2008, 09:46:02 AM
by HRamesh
List of All HTTP Error Status Code

Started by KailashBoard Site and Server Administration

Replies: 2
Views: 16321
Last post October 09, 2018, 01:56:21 PM
by sankalppatil
Need List of Image Sharing Sites for performing SEO Activities

Started by ChinkuBoard Search Engine optimization and Link Exchange

Replies: 0
Views: 2460
Last post April 29, 2010, 04:03:06 PM
by Chinku
Do follow Forums list

Started by adamsmithBoard Search Engine optimization and Link Exchange

Replies: 3
Views: 4338
Last post April 06, 2012, 10:43:40 AM
by adisonhardy