Compress and Uncompress using TAR

I often fall into situation where I have forgotten how to uncompress a tar file, specially during a new application setting up. Since this method of compression is outdate (but still widely used) and I have made my self comfortable in using “zip”. Commands for compressing and uncompressing a tar file is just as simple as zip.

 

Below is an example of compressing a folder “mango” into “mango.tar.gz”. Atributes after the command, “c” compress, “z” zip, “f” file, “v” verbose. If you want “bzip” file after compression rather than “gz”, use “j” instead of “z”.

tar czvf mango.tar.gz mango/

For uncompressing a “tar” file, use “x” extract atribute as shown below,

tar -xzvf Mango.tar.gz

Zip a File or a Folder in Linux CLI

I often require to compress large files or folder to port between servers and often find myself wondering the commands compress them. I usually use “zip” command command to accomplish my task. Option “-9” is used for best compression. This compression is compatible with Microsoft Windows too.

To zip a folder:

zip -9 -r <zip file> <folder name>

To zip a single file:

zip -9 <zip file> <filename>

How to setup a Mirrored Subversion repository

Releases after 1.4 in Subversion saw the introduction of a new tool “svnsync” which was very useful in creating two synchronized svn repositories. It can be used on many different designs and the most simplest design was to create a mirrored repository of source repository as a backup. In this article I will describe a scenario where it is one step further on above mentioned design.

Continue reading

Cisco VPN client configuration in Ubuntu

This guide is focuses on Ubuntu users who needs to connect to Cisco VPN. We will be using VPNC (it is in Ubuntu 9.04) and assumes you have profile file in .pcf format (we will use cisco.pcf as an example here).

 
Let’s begin and follow the steps exactly replacing your own pcf file:
 

Open terminal and run the following commands. Create a directory for our configuration and change into that directory,

mkdir vpnclient
cd vpnclient

Continue reading