posted by 구름너머 2006. 9. 8. 10:27

현재 사용하는 컴팩장비에서

ls명령으로 조회시 파일수가 많으면 "arg list too long" 이란 메시지가

나면서 조회가 불가능하다.

원인은 서버 설정문제.

2.방법2: 아래와 같은 방법으로 조회한다.

$ls *.log

ksh: /bin/ls: arg list too long

$ls | grep log

또는

$ls -lrt | grep log

1.방법1: 설정 값을 변경한다.

Last Updated:2000-12-14Solution-id:253.0.10495272.2883413
Environment:
Tru64 Unix
ARG_MAX
Problem Description:
Error ksh: /bin/rm: arg list too long
Unable to delete 1400 files using /sbin/rm *
Solution:
# pwd
# ls | xargs -t -i rm*
NOTE: Take care using rm especialy in the / directory. This can destroy the system.
Cause:
Exceed system limit - "arg list too long" - Is a Tru64 Unix limit defined as ARG_MAX in the limits file. This is a predefined value of 38912 bytes. This is a set value. Excerpt from errno man page- Arg list too long Indicates that the specified argument and environment lists exceed the system limit of ARG_MAX bytes, or the number of bytes in the message exceeds the predefined limit.

Excerpt from: /usr/sys/include/sys/syslimits.h

#define ARG_MAX 38912 /* max bytes for an exec function */

Excerpt from exec man page - ERRORS The exec functions set errno to the specified values for the following conditions: The number of bytes used by the new process image's argument list and environment list is greater than ARG_MAX bytes.
buy online or call 1.800.AT.COMPAQ