Find and Replace Across Multiple Files
Have you ever needed to change the same thing in a load of files and have had to sit there and go through each one in turn and make the same change? This is a really useful and simple command: perl -pi...
View ArticleSee a list of current connections to your web server
If you have a high load on your web server, it’s useful to be able to see a list of the current connections on port 80 as sometimes high load can be caused by someone abusing the site – for example...
View ArticleChanging Prompt and xterm Title in Bash
It’s really useful to not only be able to see the user and directory in your prompt but to have different colours for different users/servers – like a different colour for root or production boxes....
View ArticleRecursively chmod Files and Directories
To recursively chmod all files in the current directory (and sub-directories), you can do this: find . -type d -exec chmod 755 {} \; To do the same with just files, you can use: find . -type f -exec...
View ArticleVagrant Install on Mac OS X
Gareth Rushgrove recently wrote a good blog post about why you should be using virtualisation. (incidently, it got coverage on Hacker News and David Singleton also blogged a follow up). Anyway… Vagrant...
View ArticleFind and replace across multile files, recursivly
In a previous post, I gave a command for doing a find and replace operation across multiple files in a directory. I have used that command a number of times over the years but the problem with it is...
View ArticleNginx and why you should be running it instead of, or at least in front of...
After 9 years of development, Nginx hit a milestone release this week when version 1.0.0 was released (on 12th April 2011). Despite only now reaching a 1.0 release, it is already in widespread use,...
View Article