Change a string recursively in all directories

Make sure you’re using GNU find and GNU sed.

find . -type f -exec sed -i 's/OLDSTRING/NEWSTRING/g' {} +

Tags

Related Posts

Share This

Check TCP connections and their remote origins

Useful if you feel you’re getting DDOS, flood, or other attacks:

netstat -an | grep tcp | awk '{print $5}'|sed 's/::ffff://'|cut -f1 -d':'| sort | uniq -c | sort -n -r

Tags

Related Posts

Share This