Creating a self-signed certifcate for apache

Creating a self-signed certificate for an apache server is fairly straightforward. The following steps show you how to do it on an ubuntu / debian based system running apache: If it doesn’t already exist, make the directory for the key, csr and certificate to go in: mkdir /etc/apache2/ssl Go to that directory: cd /etc/apache2/ssl Generate the private key (Enter a passphrase when prompted, we’ll remove this later) openssl genrsa -des3 -out server....

November 24, 2010 · Ed Randall

Change case of all files in a directory

Here’s an easy way change the names of all files in a directory from upper to lower case (note that we are using ls -1 and not ls -l in this example): user@server:~/test$ ls -1 FIVE FOUR ONE THREE TWO user@server:~/test$ for file in `ls -1` ; do newfile=`echo $file | tr .A-Z. .a-z.` ; mv $file $newfile ; done user@server:~/test$ ls -1 five four one three two To invert the process, simply change reverse the options passed to the ‘tr’ command like this:...

November 24, 2010 · Ed Randall