Hi I would like to know if there is possibility to search trough multiple files at once using less. I am facing problem, that I should go trough multiple logs (instance1.log, instance2.log, instance3.log ...) and search for some test. Right now I am able to open multiple files in the less using less instance?.log but than I need to manually search trough the files and search each one individually, but I would like to search trough all of them at once. Is there such a option?
CodePudding user response:
This is an off-topic question but you can use grep. Check out this answer
CodePudding user response:
I'm not sure if this is what you want, but you can do
cat instance?.log | less
And then search through the result.
Or use grep as it is the tool that is basically made for this use case:
grep -E 'search term' instance?.log
