FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14110 questions

16769 answers

27528 comments

53887 members

0 votes
110 views 0 comments
by
Hi,

I need remove just some types of logs, like SSH for example.
I saw here in forum, how remove all logs (rm log.db).

But in my case I want remove just a type of logs.

Can you help please.

Thanks

1 Answer

0 votes
by
Hi Jolive88

The log.db file is locked to prevent removing and corrupting the entries from the database. However, you could display the table content by downloading a package called: sqlite3-cli and filtering the data you don't want to show (some SQL database manipulation is needed). Another workaround is executing the command:  logread | sed -e {pattern}. Using the sed command syntax, you could hide  the lines from the logread output you want to omit.

I hope this helps to solve your query.

Regards.