I'm using less to view log files quite a lot and every so often I'd like to filter the output by hiding lines which contains some keywords.

In less it's possible to filter-out lines with &!<keyword> but that only works for one keyword at a time. I'd like to specify a list of keywords to filter-out. Is this at all possible?


You can use a regular expression:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.