[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to check 400 files exist



On 01/19/12 12:17, Wawrzek Niewodniczanski wrote:
On 01/19/12 11:45, Jon Dowland wrote:
On 19/01/12 11:29, Wawrzek Niewodniczanski wrote:
On 01/19/12 03:04, lina wrote:

[...]
Thanks,
but here it complains so many $ ./check_file.sh
./check_file.sh: line 8: [: too many arguments

Possible problem with spaces. This one works for me:
No, the problem is the number of arguments to the ls call.
There is a limited number of arguments for a process, and
the glob sys_em_*.txt expanded to more than that number.

What is the number?

OK I found the limit (For more information look i.e. [1]). On my system is:

#>getconf ARG_MAX
2097152                                                          

So theoretical your comment is right, but I doubt that max argument limit is the reason of problem in this case.

Thanks,
Wawrzek

[1] http://www.in-ulm.de/~mascheck/various/argmax/
--
Wawrzyniec (Wawrzek) Niewodniczański - (niewod @ LinkedIn)
System Administrator - Engineering Services Team (XenServer)
Citrix Systems, Building 101, Cambridge Science Park, CB4 0FY, Cambridge
PhD in Quantum Chemistry, MSc in Molecular EngineeringM

Reply to: