Translated message

A translation of this page exists in English.

シェルコマンドまたはスクリプトに出力された argument list too long エラーはどのように対処すれば良いですか?

Solution Verified - Updated -

Issue

コマンドラインまたはシェルスクリプトから大量のファイルを処理するとエラーが発生し、以下のメッセージが発生します。

# ls *.txt
-bash:/bin/ls:Argument list too long

または、find を実行して大量のファイルを削除しようとすると、エラーメッセージが発生します。

# find -type f -name '*.txt' -exec rm -i {} \;
-bash:/usr/bin/find:Argument list too long

Environment

  • Red Hat Enterprise Linux

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content