Tag Archives: commandline

Converting a text file from uppercase to lowercase. | converting text files from uppercase to lowercase

I had a bunch of hostnames in a text file, but some were uppercase and some lowercase. This presents problems when searching and automating tasks, so  I wanted a way to convert them all into lowercase as all text should be in Linux.

Here we are using “tr” to completed this task.

 

Encrypting your home area for backup with Openssl | using openssl to encrypte and automate your backups to fileserver

Im currently running a Linux desktop, the other day the disk become corrupt and I lost my home area. Not a big problem as I dont store much data, but I lost all my ssh keys, configs etc. It took a few days to recover.

In an effort to stop that from happening again I want to backup all my data to the company file server, but I dont want them to have access to my keys and configs ect.

So I have scripted a backup which will encrypt on the fly. Through it into cron and you have a daily backup.

This is the command you run to create backup, notice the password is in the command. This is allow for automated backups using Cron.

And the following command is to run a restore, once executed you will be prompted for the password.