Posts in the Sysadmin caterory

Other categories: calendar configuration dev diagnostics easter-eggs hardware internet optimisation scripting servers software sysadmin terminal web

Batch rename extensions

Another snippet, this time to batch rename the extension of a set of files to another, in my case I needed to rename *.html files as .mustache so, as before, (when I set up a scripts folder in my user folder and added it …

Find in files script

Similar to the previous post, I can never remember the correct format for grepping recursively through folders for a particular string. So I added the following script to a file called findinfiles in the scripts …

Find files script

I can never remember the correct format of the find command so that I can recusively search through folders for a particular file or files. So I set up a scripts folder in my user folder and added it to my path in my …

Automatic backup of mysql database to S3

Most of my websites run on Amazon’s EC2 servers and in setting up a new one today I thought I had better come up with a better backup strategy. In the past I’ve just asked EC2 to create either AMI or EBS …

Ubuntu recovery mode mounting read only filesytem

I recently made some changes to my /etc/X11/xorg.conf file which backfired and Ubuntu (12.10 in this case) would crash while loading the operating system.

It should be simple enough to undo the last change you made to a …

301 redirect with args in .htaccess

If you ever need to redirect one domain name to another (using apache) and you need to do it in code you can simply create a .htacess file in the root of the folder that needs to be redirected and pop the standard 301 …

Ctrl-C no longer works in terminal on Ubuntu

The programmers behind gnome-terminal seem to have changed something to do with the way ctrl-c works. Now if you want to cancel a program that has the focus of the terminal and you hit ctrl-c then nothing will happen. …

How to spend $4000 from the commandline

I have used Amazon Elastic Cloud (EC2) for my dedicated hosting needs for nearly 6 months now. They’ve just released a new “bulk-buy” service that enables you to buy 1 or 3 years’ of as many …

How to stop Spotify on linux skipping

Spotify is a great application that lets you listen to any music they have (there’s an incredible amount on there) with the odd, almost unnoticable, advert thrown in to pay for the service. It works on windows or …

Temporarily disable touchpad while typing

In linux if you have a laptop with a trackpad just below the keyboard sometimes you can be typing away and then suddenly you touch the trackpad/touchpad and find your cursor appears elsewhere so you have to stop typing …