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 [2017/05/08 21:59]
linux-commandline-tips [2019/02/19 11:28] (current)
serbizadmin [PHP]
Line 1: Line 1:
 +====== Find  Stuff======
   * looking for duplicate filenames in 2 directories   * looking for duplicate filenames in 2 directories
-   fdupes --recurse dir1/ dir2/ +<​code>​ 
 +fdupes --recurse dir1/ dir2/ </​code>​
   * find a word in a file    * find a word in a file 
-   grep -rnw '/​path/​to/​files/'​ -e "​pattern"​+<​code>​ 
 +grep -rnw '/​path/​to/​files/'​ -e "​pattern"​</​code>​ 
 +  * find all socket files your system runs 
 +find / -type s 
 +====== Differences====== 
 +  * between files, showing side by side 
 +diff -y file1 file2 | less 
 +  * differences of files between directories 
 +diff <(ls -a /dir1/) <(ls -a /dir 2/) 
 +or compare  
 +comm <(ls -a /dir/) <(ls -a /dir2/) 
 +====== Maintenance======
   * kill a process wholesale   * kill a process wholesale
-   kill $(ps aux | grep "​$process_term"​ | grep -v '​grep'​ | awk '​{print $2}')+<​code>​ 
 +kill $(ps aux | grep "​$process_term"​ | grep -v '​grep'​ | awk '​{print $2}')</​code>​ 
 +  * trim log. example: 
 +cat /dev/null > modsec_audit.log</​code>​ 
 +See also "log rotate"​ on mL wiki. 
 +====== PHP====== 
 +  * View php config 
 +php -r "print phpinfo();"​ | grep "​.ini"​ 
 +php -i | grep in