moodLearning Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux-commandline-tips [2019/03/13 08:15]
serbizadmin [Find Stuff]
linux-commandline-tips [2020/06/03 23:57] (current)
Line 37: Line 37:
 cat /dev/null > modsec_audit.log</​code>​ cat /dev/null > modsec_audit.log</​code>​
 See also "log rotate"​ on mL wiki. See also "log rotate"​ on mL wiki.
 +  * remove everything else except...
 +<​code>​
 +rm -rf !(filename)</​code>​
 +This works only if extglob is enabled. So
 +<​code>​
 +shopt -s extglob</​code>​
 \\ \\
 ====== PHP====== ====== PHP======
Line 47: Line 53:
 php -i | grep in php -i | grep in
 </​code>​ </​code>​
 +\\
 +  * reinstall all php packages
 +<​code>​
 +apt-get install --reinstall `dpkg -l | grep '​ii ​ php7' | awk '{ printf($2"​ "); next}'​`
 +</​code>​
 +====== Log Analysis======
 +* limiting by date range
 +
 +sed -n '/​8\/​Oct\/​2019/,/​8\/​Oct\/​2019/​ p' access.log