Solution to the linux Argument list too long error, argumentlong
Solution to the linux Argument list too long error
Delete all files in the/tmp directory today. The number of files is large.
Ls-lt/tmp | wc-l385412
When rm * is used, the
Today you need to delete all the files in the/tmp directory, the number of files is more.ls-lt/tmp | wc-l385412After using RM * , the system prompts for error Argument list too longThe reason is that under Linux, trying to pass too many parameters
As an OPS person, this error is not unfamiliar, in the implementation of RM, CP, MV and other commands, if the number of files to operate, you may use the wildcard character batch processing a large number of files, then there may be "Argument list
First, the problem of the current directory in the specified sub-directory specified in the server for the specified time range of all containing "meritorious acquisition" of the log content 1, the specified subdirectory 1.2.3.25 .... 1.2.3.832,
When processing a file at noon today, who knows how to delete a clientmqueue directory?Rm-RF *After the command, the screen will jump out in about a few seconds./Bin/RM: argument list too long
Find the solution and the cause, because there are
As an O & M engineer, this error is not unfamiliar. When executing commands such as RM, CP, and MV, if the number of files to be operated is large, wildcards may be used to batch process a large number of files, in this case, the problem of
The title of this article borrowed Anthony. the title of Anthony Weston's argument is a learning book. I would like to pay tribute to Anthony and hope that more people can truly understand what arguments are ".
Debate and argument are never
1. When deleting a large batch of files in a directory, when using RM-RF or RM * will prompt the parameter list too long by modifying the command to: Find. -name "*" | Xargs rm-rf ' * ', successfully deleted 2, need to put a directory of all files
A colleague encountered a problem during loadmodule compilation.
Gmake: execvp:/bin/sh: argument list too long
Gmake: *** [. O] Error 127
This situation has not been encountered before. It was only after Google that it was known that
This article is a few days ago in the forum a friend raised the question, today is free, sorted out, released for your reference!
When Linux tries to pass too many parameters to a system command (LS *; CP *; RM *; cat *; etc) , the "Argument list
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.