# ls /media/dvd/Fedora/RPMS/*.rpm
bash: /bin/ls: Argument list too long
Q: What's the problem?
A: "The UNIX operating system traditionally has a fixed limit for the amount of memory that can be used for a program environment and argument list combined."
# getconf ARG_MAX
131072
# cd /media/dvd/Fedora/
# ls RPMS/*.rpm|wc
2931 2931 116609
If I include "/media/dvd/Fedora" in the list, it would exceed 131072. Reducing PATH name or using Shell script can run those commands correctly.
No comments:
Post a Comment