- check to make sure these are the files indeed that you would like to delete and no other
Since you want to keep all files that differ from the format mentioned, do:
-  Execute this. This will populate FilesToDelete.txtwith files/dir to be deleted. Review this to make sure that files listed in are indeed the files you intend to delete.
find /dirpath/thatto/containsdir/esymac_logEvents.log* | xargs ls -l > FilesToDelete.txt
- Once you verify the first step, execute this command
- Once you verify the Step-1, do
find /path/to/dir/esymac_logEvents.log* -type f | xargs rm -f
- If directories are involved as well that needs to be deleted, Skip 2 and do this instead:
find /dir/that/contains/esymac_logEvents.log* | xargs rm -frf
 
                