Monthly Archives: July 2013

Chmod and Chown Notes

find . -type d exec chmod 1775 {} \; -print The most common use of the sticky bit today is on directories. When the sticky bit is set, only the item’s owner, the directory’s owner, or the superuser can rename … Continue reading

Posted in Linux | Comments Off on Chmod and Chown Notes

MySQL bin logs

To create bin-logs enable log-bin, set that to a directory (/var/lib/mysql) Restart mysql To read them out: mysqlbinlog /var/lib/mysql/bin-log.000001 > /root/textform

Posted in Linux, MySQL | Comments Off on MySQL bin logs

Sed

To replace all instances of search with replace throughout the file called filename: “sed -i -e s/search/replace/g filename” to edit one in place “cat filename | sed s/search/replace/g > /tmp/tmpfile ; mv /tmp/tmpfile filename”

Posted in Linux | Comments Off on Sed

How to Index For Joins in MySQL

http://hackmysql.com/case

Posted in Linux, MySQL | Comments Off on How to Index For Joins in MySQL

Keepalives

Using Apache keepalives on your server can reduces CPU usage since it allows the same connection to be used for images, stylesheets, javascript, etc. If KeepAlive is disabled a separate connection must be made for each of those files. Creating … Continue reading

Posted in Linux | Comments Off on Keepalives