Skip to main content
2 of 4
edited tags
Jeff Schaller
  • 68.8k
  • 35
  • 122
  • 265

Putty - How to search specific string in specific date

Need help, can anyone please advise that in Putty how can i search specific string in specific date

for example i have 3 files named 'a1' dated: 20 Feb, 'a2' dated 21 Feb, 'a3' dated 22 Feb.

now i want to search certain string like 'JMS111' in all files where date = '21 Feb'

i tried below commands but didnt get success

ls -lt |grep 'JMS111' -ctime 2019/02/21 
find -name '*.xml' -type f -printf '%Tw:%h/%f\0' | grep 'JMS111'