eg
#find/agent4.0/swap/"*" | Xargs-n rm {} \;
A procedure that is deleted reports a hint that the file or directory does not exist. But the file was finally removed and the problem solved.
find:0403-027 The parameter list is too long this error message is confusing: does the directory
Are there too many files? Not really, the problem is on that "*", Korn Shell defaults to * as
The Metadata processing is extended and this statement is incorrectly parsed my operating platform is AIX 5.3. I don't
Ok this is related to the Korn Shell of this platform
Use Ls/grep/find and other commands when the use of wildcard characters, inadvertently will encounter such a mistake can
To prevent extension by adding quotes to the object
There are other times when use the RM command, you may also encounter:
rm:0403-027 The parameter list is too long.
The root cause of this error is because/USR/INCLUDE/LIMITS.H defines the system core Line_bufsz limit as
If you have a large number of files to delete you can consider using the Xargs-n parameter for bulk deletion. Refer to the following example:
find/backup/-ctime 2-print | Xargs-n rm {} \;
[Dbapp@root@/agent4.0/swap] #lsattr-e-L sys0-a Ncargs
Ncargs arg/env list size in 4K byte blocks True
[Dbapp@root@/agent4.0/swap] #chdev-L sys0-a ncargs=6
SYS0 changed
0403-027 The parameter list is too long
When we execute RM or other commands, the system will report 0403-027 the parameter list is too long, such as:
#find./-mtime +10-name *.trc ksh:/usr/bin/find:0403-027 The parameter list is too long.
This occurs primarily because the AIX kernel parameters are Ncargs controlled, and the Ncargs parameters are described as follows:
Ncargs Purpose: Specifies the maximum allowable size for the Arg/enu list (blocks size 4 KB) when running the exec () subroutine.
Value: Default value: 6; Range: 6 to 1024
Showing: LSATTR-E-L sys0-a Ncargs
Change: Chdev-l sys0-a ncargs=newvalue
Changes are immediately effective and are saved during boot time.
Diagnostics: The user is not allowed to perform any additional processes because the variable table passed to the EXEC () system call is too long. Low defaults can cause some programs to fail with a bad list too long error messages, in which case you can try using the Chdev command above to increase the Ncargs value, and then rerun the program.
Adjustment: This is a mechanism to prevent the exec () subroutine from being too long for the variable table to fail. Note that adjusting to a higher Ncargs value adds some additional restrictions to the system's memory resources.
With 0403-027 errors, we now have a discussion of two ways to solve this problem:
Method One:
1. Increase the Ncargs value
#chdev-L sys0-a ncargs=64
2.OK, you can delete
#rm *
3. Work done, the parameters back to the original value
Chdev-l sys0-ncargs=4
Method two: Using recursive parameter passing
Find./-mtime +10-exec rm {} \;