Need help on shell

Hi

file 1 : dbname_schemaname_11042014_exp.dmp
file 2 : dbname_schemaname_desktop_11042014_exp.dmp

I want file1 to be print and it should be lastest by timestamp
If I do ls -lrt dbname_schemaname_*_exp.dmp I will get both files, but I want only 1st file what pattern I should use that I can get only first file and if there 10 files with same pattern I need latest file. Is it possible ?

Try:

ls -lt dbname_schemaname_[0-9]*_exp.dmp | head -n 1

Hi Don

Thank You very much. i understood and now able to do what i wanted to do whth your helpl.