Timeline for find file newermt and grep file content not working
Current License: CC BY-SA 3.0
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 13, 2018 at 13:04 | comment | added | George Udosen | @VitaliyTerziev as you wish my lord, :)! | |
| Jan 13, 2018 at 13:01 | comment | added | Vitaliy Terziev | George, I've marked ilkkachu's reply as answer because of the structured and detailed explanation. However I've +1 yours yesterday since it is also correct to some extent. | |
| Jan 12, 2018 at 23:35 | comment | added | Vitaliy Terziev | Thanks guys, so @steeldriver / George, sorry for asking again same question but the command line, is it reliable for what I am looking for? I will try the -H flag as well for getting the file names/paths. | |
| Jan 12, 2018 at 19:28 | comment | added | George Udosen |
Would + not be ok too, and the -print prints all file names
|
|
| Jan 12, 2018 at 18:48 | comment | added | steeldriver |
With \; you are passing only a single file at a time to grep, so it won't print the filename by default - you will need to add the -H option if you want it to add the name. Or add a -print to the find command.
|
|
| Jan 12, 2018 at 17:45 | comment | added | George Udosen |
Remove the \; and use + and see if it helps
|
|
| Jan 12, 2018 at 17:41 | comment | added | Vitaliy Terziev | Thanks, George. I think your solution is working but id does not show the path of the file, I've modified it a bit - find ./ -name "example.xml" -newermt "2017-01-08" -exec grep "videoplayer.1" {} ./ \; Do you think that it is reliable? | |
| Jan 12, 2018 at 17:38 | history | answered | George Udosen | CC BY-SA 3.0 |