Page 1 of 1

Linux noob needs a little help

Posted: Sunday 30 October 2016 20:00
by Jan Jansen
Hi all,

In /var/log I created a domoticz.log file. I like searching in this file to: "incomming connection from:". Somewhere on the forum there is written an appropriate command. The command has something to do with 'grep' and the location of the domoticz .log file. I have searched for a long time without success. I hope someone can help.

Thanks in advance!

Jan

Re: Linux noob needs a little help

Posted: Monday 31 October 2016 16:33
by stlaha2007
Must have been like this:
grep 'incoming connection from' /var/log/domoticz.log

Or like this:
cat /var/log/domoticz.log | grep 'incoming connection from'

Sent from my D6603 using Tapatalk

Re: Linux noob needs a little help

Posted: Monday 31 October 2016 21:39
by sirray
I would use a grep -i "search text" /var/log/domoticz.log

With the -i it searches case insensitive :)

Re: Linux noob needs a little help

Posted: Tuesday 01 November 2016 7:35
by stlaha2007
sirray,
You're right, using ctrl+r and other shortcuts...

Also when searching special character "escape" them woth a backslash before the character, like: "connection from\:"


Sent from my D6603 using Tapatalk

Re: Linux noob needs a little help

Posted: Tuesday 01 November 2016 8:47
by Jan Jansen
Hello stlaha and sirray,

Thank you for your attention! I was looking for: cat /var/log/domoticz.log | grep 'Incoming connection from'

Jan