Argument too long list error

I have a wrote a script which consits of the below line.. Below of this script I'm getting this error "ksh: /usr/bin/ls: arg list too long"

The line is
log_file_time=`ssh -i $HOME/.ssh/id_rsa -q $i ls -lrt /bp/karthik/test/data/log/$abc*|tail -1|awk '{print $8}'`

And $abc alias is as "p | grep LTP | awk '{print \$10}'"

And P has one more alias which show the process..

Please help me this is very urgent for me.

Thanks,
Karthik Reddy

There are too many files in that directory. Try to use ls without wildcards, for example like so:

ls -tr /bp/karthik/test/data/log | sed -n "s|^$abc|/bp/karthik/test/data/log/&|p" | tail -1