Working with tar command

The GNU tar command included with Linux Distributions are used to compression files using either of the two compression algorithms – bzip2 and gzip. gzip was released in 1994 that uses the Deflate algorithm. The bzip2 algorithm came about four years later that compresses files more effectively than the gzip algorithm, but it is relatively slower. bzip2 is based on the burrows-wheeler algorithm. Users can specify bzip2 algorithm to use for compression or extraction with the -j option and the gzip algorithm with the -z option.

tar -xzvf myfile.tar.gzip

  • extracts gzip tarred file


tar -xjvf myfile.tar.bzip

  • extracts bzip2 tarred file


tar -czvf myfile.tar.gzip file1.txt file2.txt

  • compresses file1.txt and file2.txt using gzip compression


tar -cjvf myfile.tar.bzip file1.txt file2.txt

  • compresses file1.txt and file2.txt using bzip2 compression

The -v option will verbosely list files that are being processed. The -f option will tell tar to use the file archive as the tar archive.


tar -tvf myfile.tar

  • list all files in myfile.tar verbosely

Vim and Python: The Unbreakable Match

If you write your python codes in vim editor all the time, you should checkout the python-mode vim plugin that comes with features that will make you feel as if you are using an IDE for Python:

  • Syntax highlighting
  • Virtualenv support
  • Run python code (`r`)
  • Add/remove breakpoints (`b`)
  • Improved Python indentation
  • Python folding
  • Python motions and operators (`]]`, `3[[`, `]]M`, `vaC`, `viM`,`daC`, `ciM`, …)
  • Code checking (pylint_, pyflakes_, pylama_, …) that can be runsimultaneously (`:PymodeLint`)
  • Autofix PEP8 errors (`:PymodeLintAuto`)
  • Search in python documentation (`K`)
  • Code refactoring (rope_)
  • Strong code completion (rope_)
  • Go to definition (`g` for :RopeGotoDefinition)

It is recommended that you install python-mode with Pathogen which is another Vundle like plugin manager for vim. To install Pathogen, run the following command from your terminal:


mkdir -p ~/.vim/autoload ~/.vim/bundle && \
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim

After installation, you can enable Pathogen adding the following in your ~/.vimrc:


" Pathogen load
filetype off

call pathogen#infect()
call pathogen#helptags()

filetype plugin indent on
syntax on

To add python-mode plugin, all you need to do is to add the python-code code from its github repo to the “bundle” folder of .vim:


cd ~/.vim/bundle
git clone https://github.com/python-mode/python-mode.git

To get started with using python-mode in vim, open any vim file and read a short documentation on python-mode:


:help pymode