Argument list too long!!

Dear Experts,

I have a list of 10K files in a directory. I am not able to execute any commands lile ls -lrt, awk, sed, mv, etc........

I wanna execute below command and get the output. How can I achieve it?? Pls help.

root# awk -F'|' '$1 == 1'  file_20120710* | wc -l
/bin/awk: Argument list too long.
0

You need to use xargs to be able to issue commands on such a long list of files.

root# echo /{dir}/file_20120710* | xargs awk -F'|' '$1 == 1' | wc -l 

Whether the above syntax is correct?