Geek Projects – Linux, Apache, MySQL, PHP

A Linux Sysadmin
  • Home

Archive

Posts Tagged ‘argument list too long’

Bypass rm's “argument list too long” error message with xargs

March 2nd, 2009 No comments

When using rm to delete a large number of files, you may come up against a kernel limitation which limits the length of arguments that can be sent to rm:

$ rm *

bash: /bin/rm: Argument list too long

This one-liner utilizes xargs to bypass this limitation:

ls | xargs rm

Categories: Linux
RSS
  • Google
  • Youdao
  • Xian Guo
  • Zhua Xia
  • My Yahoo!
  • newsgator
  • Bloglines
  • iNezha

Random Posts

  • vsftpd's “500 OOPS: cannot change directory” error
  • Logging into a VMware Server stuck on the “Loading…” Page
  • Allowing @ Signs in MediaWiki User Names
  • Printing to a Cannon ImageRunner 5075 from Microsoft Word 97
  • Resuming failed Firefox downloads

Tag Cloud

argument list too long rm xargs

Categories

  • FreeBSD
  • Internet Telephony
  • Linux
  • Mac OS X
  • Productivity Apps
  • Scripting
  • Systems Administration
  • Virtualization
  • Web Development
  • Web Hosting
  • Windows
  • Wireless

Blogroll

  • FreeBSD Consultant
  • Linux Consultant

Archives

  • April 2010
  • January 2010
  • November 2009
  • October 2009
  • August 2009
  • July 2009
  • April 2009
  • March 2009
  • January 2009
  • October 2008
  • August 2008
  • July 2008
  • May 2008
  • April 2008
  • February 2008
  • January 2008

Meta

  • Register
  • Log in
Top WordPress
Copyright © 2008-2010 Geek Projects – Linux, Apache, MySQL, PHP
Theme by NeoEase. Valid XHTML 1.1 and CSS 3.