Skip to content

molecularsciences.org

Simply Explaining Technology

  • Articles
    • bash
    • Drupal
    • Java
    • Linux
    • Mac OS
    • PHP
    • Python
    • Quick Introduction
      • Amazon Cloud
      • BioPerl
      • Data Science
        • Apache Spark
        • Hive
      • Java Programming
      • JSON
      • MongoDB
      • JavaScript
        • gulp.js
        • Laravel 5
        • Node.js
      • WordPress
      • XML
  • Special Topics
    • Reference
    • Design Patterns
    • installation guide
    • Optimization
  • Topics
    • Architecture
    • cloud
      • AWS Amazon Web Services
    • CMS Content Management System
      • Drupal
      • WordPress
    • Database
      • MySQL
      • Oracle
    • Programming
      • bash
      • Java
      • PHP
      • Python
    • Linux
    • Science

/bin/rm: cannot execute [Argument list too long]

#bash, #find, #JSON, #Linux
Views: 168

Error

/bin/rm: cannot execute [Argument list too long]

Cause

rm can only handle a certain number of arguments. If you run following command in a directory of 500 json files, the argument list is 500

$ rm -f *.json

Solution

Use find or find coupled with xargs as follows:

$ find . -name "*.json" -print0 | xargs -0 rm

or

$ find . -name "*.json" -delete

Post navigation

Reading content of a file using bash
vi editor

Related Post

Everything you need to know about find

File Management with ls, cp, rm, and find

Comprehensive Guide for using tar

Advertisement
Topics
Architecture Artificial Intelligence AWS Amazon Web Services bash cloud copilot Database Data Science Drupal Java JavaScript Linux Mac OS Microsoft Excel Microsoft Office Microsoft Windows Miscellaneous MySQL Oracle PHP Programming Python Q&A Reference Science Statistics Uncategorized WordPress
Tags

AI Amazon EBS Amazon S3 Apache architecture Availability Zones AWS Amazon Web Services bash Bioinformatics Cloud cloud computing command line tips crispr Database Design Patterns Drupal EFS Elastic File System ELB Elastic Load Balancer file management installation guide Java JavaScript JSON Linux Mac OS Microsoft Excel Microsoft Windows ML MySQL Networking Optimization Oracle Perl PHP PL/SQL Programming Python SciPy ssh statistics string manipulation vagrant versioning wordpress xml

You missed

Artificial Intelligence Miscellaneous

Generative AI Explained: How Machines Learned to Create

Artificial Intelligence

The Evolution of Artificial Intelligence: From Thought Experiments to Thinking Machines

Database Oracle

Oracle SQL Error Cheat Sheet: Common Errors and Fixes

Python Science

JSON, XML, and YAML for Scientists: Data Formats Explained Simply

molecularsciences.org

Simply Explaining Technology

Proudly powered by WordPress | Theme: Newsup by Themeansar.

  • Home
  • Blog
  • Sample Page