Useful Command Line Tools

December 27, 2015

As a bioinformaticians we are sentenced to use one of the most powerful tools in informatics: the command line shell. By itself the shell is very powerful with some of the most useful functionalities that doesn't have an equivalent on the graphic side of the OS (GUI), such as sed, grep, less, ...

However, some of the functionalities of the GUI are missing, and some functions are just not perfect. In this short post I will introduce couple of tools that make you life in front of a prompt much pleasant.

1) Z:

As a command line user, often I find myself jumping between different locations of the system, especially while using a controlled environment such a University cluster. In such cases you don't have a full control of the structure of the file system and you easily have to jump from the project directory, to a tmp location and probably a scratch space.

z in that case makes my life much easier. z allows me to jump around the most used directories of the system:

SYNOPSIS
       z [-chlrtx] [regex1 regex2 ... regexn]

Tracks your most used directories, based on 'frecency'.

After a short learning phase, z will take you to the most 'frecent' directory that matches ALL of the regexes given on the command line, in order.

For example, z foo bar would match /foo/bar but not /bar/foo.

Details, full documentation and how to install are available on the project's github repository.

2) tldr:

The second tool of this post is tldr. How many times have you found yourself sifting through a man page or the function help without truly finding how the command actually works, or found yourself searching through stackoverflow. tldr solves this problem and saves a lots of time by providing a shorter version of the man page along with examples of how to use the command.

Example: image

tldr could be installed and accessed through multiple sources:

You can access these pages on your computer using one of the following clients:

You can visit the project's github repository for more information.


Happy new year and best wishes to all!

Comments