Skip to Content

Category Archives: Web Server

Posts relating to all things web server

Find Files Over A Certain Size on Web Server

Written on August 24, 2011 at 2:03 pm, by Matthew

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

Written on August 24, 2011 at 2:01 pm, by Matthew

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 {} \;

Retrieving Plesk Email Address Passwords

Written on June 27, 2011 at 9:07 am, by Matthew

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

Written on June 22, 2011 at 3:38 pm, by Matthew

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