I'm performing this grep: grep -l "Validation failed" *.dbg
This returns a file listing. However, I'm most interested in the times modified of these files.
What would the proper command be?
Edit: the argument in the title was wrong.
I'm performing this grep: grep -l "Validation failed" *.dbg
This returns a file listing. However, I'm most interested in the times modified of these files.
What would the proper command be?
Edit: the argument in the title was wrong.
xargs is my friend, apparently. The answer is: grep -l "Validation failed" *.dbg | xargs ls -ltr
You can also do it with
for file in `grep -l "Validation failed" *.dbg`; do ls -ltr $file; done
but xargs is definitely neater, shorter, and gives you easy delimiter options.