Changing File Ownership Using chown and chgrp

Introduction If you need to brush up on file ownership and permissions please read this article first. In this tutorial we will cover how to change user and group ownership of files and directories. To find out who owns a file or what group it belongs to there are two main options. ls -l and […]

Read More

Using diff and patch

Introduction diff and patch are exceptionally useful tools if you want to discover the differences between two files. The patch program allows you to take the output from diff and make those changes to the original files located on another system. This tutorial will concentrate on this use case although it can be used for […]

Read More

Downloading files with curl

cURL is both a library and a command line utility written to handle the transfer of data using many different protocols. It is scriptable and extremely versatile but this makes it quite complicated. If you are looking for a utility to download a file then please see wget. We would recommend reading our wget tutorial […]

Read More

Downloading files with wget

The wget command is an internet file downloader that can download anything from files and webpages all the way through to entire websites. Basic Usage The wget command is in the format of wget [options] url. In its most basic form you would use wget http://www.domain.com/filename.zip for example. This will download the filename.zip file from […]

Read More

Using kill, killall, and pkill

The kill command is in the format of kill signal processid. The kill and killall commands are used to kill the specified processes. Warning! The kill and killall commands are extremely powerful. If they are misused they can bring a server down. If you are new to these two commands it is recommended that you […]

Read More

Viewing Files with cat and more

less, more and cat are all file viewers but each has their own particular uses. cat simply prints the file to the standard output (your screen usually) in one big rush. If it is a simple file with say 10 or 20 lines this is the command to use. more allows you to do the […]

Read More

Using gzip

In this tutorial we will be looking at the family of commands gzip, gunzip and zcat. These command will create a compressed archive in the zip format, unzip a compressed zip archive and display the contents of a file compressed in the gz format. Important The gzip command by default will zip a file and […]

Read More

Using du and df

The df and du commands are two small utilities that are extremely useful. The df command displays the disk free space and the du command displays the disk usage. There basic usage is df [options] and du [options]. Using du The basic usage of du is simply du. When run you will see an output […]

Read More

Using cron

Cron jobs are designed to execute tasks at specific times. These can be anything from server maintenance (updates), monitoring, scheduled software tasks such as updating membership stats plus lots more. Each user on the system has it’s own crontab and although it is possible to edit other users crontabs if you are root for the […]

Read More

Using GNU Tar

The tar command is used to join many files together into one, and optionally compress them. The process is totally reversible. This is used for archival purposes, backups or for sending on to others. Creating a Tar file The tar command has two main options relating to creating an archive. These are -c and -z. […]

Read More

Using grep

Introduction Grep stands for Globally search a Regular Expression and Print. The basic usage of the command is grep [options] expression filename. Grep will by default display any lines in a file that contain the expression. The Options The main options we will use in this tutorial are -P, -v, -i, -c, –color, -L, and […]

Read More