Skip to Content

About: Matthew

Recent Posts by Matthew

Find Files Over A Certain Size on Web Server

To find files over 30M the following could be used: find / -type f -size +30000k -exec ls -lh {} \; | awk ‘{ print $5 “: ” $9 }’ |sort -n Helps if you are running out of space. It can take a while to complete though so have patience!

Command Line Delete Files Over A Certain Age

How to find files and delete them over a certain age: EG .html files over 28 days old find -name “*.html” -mtime +28 -type f -exec rm {} \;

Jquery Trigger onchange() Event.

While developing a subscription module i required the need to trigger an onchange event. I had a <select> which displayed all the products and when the selected option value changed it would perform an ajax request and load the products options to be displayed below the product. This worked like a charm however I neededContinue Reading

Retrieving Plesk Email Address Passwords

Recently I had to try login to a webmail account for a client. I needed their password but couldn’t remember what it was set to and didn’t really want to reset the whole password so I decided to look in the Plesk database (psa) to see if I could find it. The database was veryContinue Reading

.docx becomes .zip when viewing on the web

I recently stumbled on the problem of my web server serving .docx files and them becoming .zip. The problem is that the mime types were not up-to-date so it thought they were zip files. In order to fix this I added the following to my /etc/mime.types These are the new mime types for things likeContinue Reading