Difference between revisions of "Useful commands"

From WTFwiki
Jump to navigation Jump to search
Line 2: Line 2:
 
<pre>
 
<pre>
 
grep -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}" maillog | sort | uniq -c
 
grep -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}" maillog | sort | uniq -c
<pre>
+
</pre>

Revision as of 15:34, 14 December 2018

Parsing internet addresses from a log file, sorting, counting;

grep -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}" maillog | sort | uniq -c