Sort the filenames containing . in file name

Hi All,

I have a list of files in a directory ..which are look like:
42420031.1000
42420031.1001
42420031.396
42420031.402
42420031.403
42420031.404
42420031.405
42420031.406
42420031.407
42420031.408
42420031.409

Here when i do ls 42420031* |sort it gives the output as

42420031.1000
42420031.1001
42420031.396
42420031.402
42420031.403
42420031.404
42420031.405
42420031.406
42420031.407
42420031.408
42420031.409

which is incorrect;it should be
42420031.396
42420031.402
42420031.403
42420031.404
42420031.405
42420031.406
42420031.407
42420031.408
42420031.409
42420031.1000
42420031.1001

here problem is causing by character '.' and it interprets as dot(decimal)..
Can anybody pls help me to do this sorting right??

Many thanks for your help.

Regards,
Sanjay

ls 42420031* |sort -n -k 1.10 

yet another way...

ls | sort -t. -k1,1n -k2n

Hi Jim,

Thanks!!

This worked absolutely fine for me.

you guys are remarkable.

Many thanks again!

Regards,
Sanjay

---------- Post updated at 06:44 AM ---------- Previous update was at 06:43 AM ----------

Hi Shamrock,

Thanks!!

This also worked fine.
Many thanks again!

Regards,
Sanjay