... so you need to chop the argument list up into >>smaller chunks. You can
do that easily with "find" and "xargs". Find will list the given files,
including doing "*" >filename glob matching, and xargs will take a stream of
arguments on its standard input and pass them, one chunk at a time, to some
command as arguments: find CHEPELARE -name "*.htm" | xargs ls or, if there
are oddly-named files in the tree which might otherwise confuse xargs (eg.
files with spaces in their names), you can use the more-reliable
null-terminated form to pass the find output to xargs: find CHEPELARE -name
"*.htm" -print0 | xargs -0 ls That's not _quite_ the same as your original
ls, because the find will recurse many directories deep --- use the
"-maxdepth" argument to find to prevent that --- and because ls's field
formatting may get reset each time xargs starts it up again. But it's the
most reliable way of running some command over an arbitrarily long list of
files. Cheers, Stephen
:-)) When the culprit is known (my ignorance) to find the solution is easy.
The find/xargs combination seems most robust to me, althou I beleave that
find CHEPELARE / -name *.htm -exec ls {} \; (or cat {} \;) will work
also...... -maxdepth is not needed in my case, couse CHEPELARE/ is no-leaf
directory
Thanks again for all answers and clarifications
Kostadin Karaivanov
Senior System Administrator @ Ministry Of Finace
tel: +359 2 98592062
larry@xxxxxxxxxxxxxxxxxxxx
|