we want to fetch the latest file in a given directory and also the file name should match the below pattern
Example file name ->hrdata-2015-10-13-16-45-26.xml(2015-10-13-16-45-26- it is not current timestamp, we just need to check for the pattern)
We expect the file will have the following structure
hrdata-yyyy-mm-dd-hh-mm-ss.xml
Please help us with the UNIX command to be used in shell script to fetch the latest file and also the matching pattern