ls data_* | sort -n -t _ -k 2
-n: sorts numerically-t: field separator '_'-k: sort on second field, in your case the numbers after the first '_'
How about using the -v flag to ls? The purpose of the flag is to sort files according to version number, but it works just as well here and eliminates the need to pipe the result to sort:
-v
ls
sort
ls -lv data_*
If your sort has version sort, try:
ls -1 | sort -V
(that's a capital V).