How can I find files that contain specific content (grepable) and sort the found files by last modified time? (I want to select just the one newest file)
This command finds files:
find subfolder/ -maxdepth 1 -type f -exec grep -l 'blue_wizards' {} \;`
This command finds files and sort them:
find subfolder/ -maxdepth 1 -type f -printf "%T+ %p\n" | sort
But if I supply -printf the input to -exec grep will be not what I want.