Archive for the 'Linux' Category

5 Things you Need to Know When Switching to Linux

1. Everything in Linux is a file, even your hard drives. (dev/hda1) No c:/ stuff. Linux is based on a directory system which is all contained in ‘/‘, aka root.

The ’slash’ is very important, for example, /mnt will start at / and look for mnt. If you type mnt/file it will look in the current directory that you are in for the folder ‘mnt’ and the file ‘file’. This was very confusing for someone that isn’t used to typing paths into the command line. Windows users are used to typing c:/ for the root directory so they may forget that / is the top level. Read more »

Creating Useful Bash Aliases

Bash can be configured to recognize any word you want and link it to a command. This is called an alias. This is can be used for many reasons. For instance, you could assign a short word like dvdbackupnow to execute a very long command that you don’t want to memorize each time you want to back up a DVD. We will explore a few useful aliases and how to add them to bash. Read more »

Encrypt a File on Linux or FreeBSD with GnuPG

If you ever wanted to quickly encrypt a file in Linux or FreeBSD without complicated keyrings and key files this is the post for you. In this guide we will use gnupg to quickly encrypt any file in Linux or FreeBSD. We will keep it simple and easy and leave out public/private key ring authentication and stick with simple password phrase encryption. Unlike password protection in zip files and other weak security implementation, PGP or GnuPG is a very secure way of encrypting files. It is pretty easy to set up so lets get going. Read more »

Numbering Each Line in a Text File

Sometimes we are given an error message that references a line number in a text file. We can number each line so we can find the error message right a way. In fact, we can print out the exact line that contains the error. This is often useful for finding errors in PHP. If there is an error in the syntax of PHP it will give you the line number it is on. Often times I don’t work in an environment that shows line numbers and I am not about to count each line by hand. Read more »

Securely Wipe a File with DD

Sometimes we have sensitive data that we want to get rid of. Since deleting a file doesn’t actually prevent it from being recovered we need to do some extra steps to ensure that it can’t be recovered. In this post we will use DD to complete this task. DD is often the tool digital forensics use to duplicate hard drives we will use it for a more destructive use so that our data can’t be recovered. Read more »

Use Rsync for Daily, Weekly and Full Monthly Backups

Today, we will be using rsync to make daily, weekly, incremental backups and then a full compressed/archived backup once a month. We will then use cron to automate the process. Lets face it us humans get lazy sometimes and most backup systems loose complete effectiveness if they are not completely automated. Read more »

Make a Backup Image of your Hard Drive with DD

Dd is a tool that is often used in computer forensics because it is extremly low level and effecient at creating exact duplicates of hard drives. For this reason it is often the tool for which all other tools are compared to. But is it useful for us regular Joes?. Can we use dd to create digital copies of our hard drives for backup reasons? Yes we can, and I actually find that it is easier to use than commercially available solutions Read more »

Protecting Linux from Fork Bombs

Fork bombs are basically a never ending loop. They open a processes that opens other processes that open even more processes exponentially. Causing any computer to lock up within a matter of seconds. Although they have to be ran from a logged in user they are still a threat. Users can unintentionally cause a complete lockup of a production server. Read more »

Next Page »