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
Next revision Both sides next revision
linux-commandline-tips [2018/12/11 05:20]
serbizadmin [Differences]
linux-commandline-tips [2019/03/13 00:15]
serbizadmin [Find Stuff]
Line 1: Line 1:
 ~~NOTOC~~ ~~NOTOC~~
 ====== Find  Stuff====== ====== Find  Stuff======
-  * looking for duplicate filenames in 2 directories+  * looking for **duplicate** filenames in 2 directories
 <code> <code>
 fdupes --recurse dir1/ dir2/ </code> fdupes --recurse dir1/ dir2/ </code>
-  * find a word in a file +  * find a **word** in a file 
 <code> <code>
 grep -rnw '/path/to/files/' -e "pattern"</code> grep -rnw '/path/to/files/' -e "pattern"</code>
-  * find all socket files your system runs+  * find all **socket** files your system runs
 <code> <code>
 find / -type s find / -type s
 +</code>
 +  * find the latest file in a folder/subfolder
 +<code>
 +find . -type f -printf '%T@ %P\n' | sort -n | awk '{print $2}'
 </code> </code>
 ====== Differences====== ====== Differences======
Line 33: 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.
 +\\
 +====== PHP======
 +  * View php config
 +<code>
 +php -r "print phpinfo();" | grep ".ini"
 +</code>
 +or 
 +<code>
 +php -i | grep in
 +</code>