Linux

Colorize Make, GCC and Diff’s Output

Generally, output is more readable when it has colors to allow you distinguish between warnings, errors and progress logs.

Using colormake, colorgcc and colordiff, you can have the output of make, gcc, diff (respectively) coloured.

To install in Ubuntu:

sudo apt-get install colorgcc colormake colordiff

You might want to use aliases to override the normal make/gcc/diff commands.

Original tip from here.

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Reddit Post to StumbleUpon

Tags:

Saturday, July 17th, 2010 Linux No Comments

Send Self Reminders To Your Email From The Command Line

The following will allow you to send self reminders/TODO items to your Email at a specific time.

For example, if you want to remind yourself to submit an assignment at 15:20, you’ll be able to run this command to do it:

tdr “submit assignment” 15:20

This will send an Email to you, with the subject: [TODO] submit assignment. Email will be sent at 15:20.

To be able to do this, you migh need to configure your mail command (see my post about this).

Then, add this function to your ~/.bashrc file (or any file sources in bashrc):

› Continue reading

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Reddit Post to StumbleUpon

Tags: , , , ,

Saturday, March 21st, 2009 Linux No Comments

Mount ISO Images From the Command Line

To mount an ISO image from the linux command line:

sudo mount -o loop image_file.iso /path/to/mount/folder

Via Tips4Linux

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Reddit Post to StumbleUpon

Tags: , , ,

Saturday, March 21st, 2009 Linux 1 Comment

Modify Ctrl-Alt-Del Behavior in Linux

I hate the Ctrl-Alt-Del combination, maybe because it reminds me of the unpleasant days when I used other operating systems. If you want to modify it, then here is how to do this:

In Ubuntu

Open the file /etc/event.d/control-alt-deleteĀ  (You need supper user privileges)

You should see a line similar to this:

exec /sbin/shutdown -r now “Control-Alt-Delete pressed”

Which binds ctrl-alt-del to rebooting your computer. Change it to execute any other program you want. Of course you can disable it completely by commenting the whole file.

› Continue reading

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Reddit Post to StumbleUpon

Tags:

Saturday, March 21st, 2009 Linux No Comments

Removing Control Characters From a Text File in Linux

A few weeks ago, I had a text file generated in widows, and it had the “^M” control character at the end of each line. I had to compare it with a similar file generated on my Linux machine (using diff), and because of these control characters it failed diff.

The first step was to check why diff failed. Normally, you cannot see these control characters, and one might be surprised that the comparison fails thought the files are exactly the same. In order to see these characters, one should use “-A” flag with the cat command:

› Continue reading

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Reddit Post to StumbleUpon

Tags: , ,

Wednesday, January 28th, 2009 Linux 8 Comments

Add Colors to Your Manpages

I use the manpages a lot. Manpages are a very useful database of information for linux users and developers. The problem with them is that their appearance becomes boring after a while.

I already wrote a post about reading them from firefox, so they’re displayed in a nice way as html pages.

In this post we’ll add colors to the manpages viewed from inside the shell.

First, open your ~/.bashrc file. To open it with gedit you can type:

gedit ~/.bashrc

› Continue reading

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Reddit Post to StumbleUpon

Tags: , ,

Monday, December 15th, 2008 Linux 3 Comments

View the Manpages in Firefox

A cool way to view manpages in linux: View them as html (with color) in firefox.

First, you need to install a program called man2html. Doing this in Ubuntu is as easy as opening a terminal and typing:

sudo apt-get install man2html

Now, that you have this program installed, open your firefox.

› Continue reading

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Reddit Post to StumbleUpon

Tags: ,

Monday, December 15th, 2008 Linux 3 Comments

Take Screenshots in Linux with “scrot”

I have found this tool recently, and I have no idea how I was able to manage without it before.

This tool allows you to capture any region of your screen, by selecting it with your mouse, clicking on the title-bar of a window and other methods. It’s very flexible and contains many options.

To download the program in Ubuntu:

sudo apt-get install scrot

Now, open a new text file and type this

› Continue reading

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Reddit Post to StumbleUpon

Tags: , ,

Friday, November 14th, 2008 Linux 9 Comments

Todo.txt – A simple yet powerful todo manager for Linux

Recently, I discrovered todo.txt, a great todo list manager for people who feel comfortable with Linux’s command line.

The greatness of this tool is in its simplicity: the whole todo list is saved as plain text, and operations like adding/removing/prioritarizing/modifying/listing items are done through a very simple command line interface supplied in a bash script.

› Continue reading

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Reddit Post to StumbleUpon

Tags: , , ,

Saturday, October 18th, 2008 Linux 2 Comments

Printing with Color to a Linux Console

A few days ago, I wanted to print colored strings from C++ to Linux terminal. I made a small research in the web and found a simple way to do this.

It’s possible to format the foreground color, background color and other display settings by printing a certain string to your terminal. This feature is implemented in the terminal itself, and is not programming language dependent.

The magic string is of this format:

› Continue reading

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Reddit Post to StumbleUpon

Tags: , ,

Thursday, August 7th, 2008 Linux 3 Comments
my email
my photo
Hi,
My name is Amir Watad. I have a BSc. in biomedical engineering from The Biomedical Engineering school , Technion , Israel, and a BSc. in electrical engineering from The Electrical Engineering school , Technion , Israel.
I'm a Verification Engineer in Mellanox Technologies Ltd.
I love Linux, the Command Line and the OpenSource Community.
I used to write Poems (Arabic) when I was able to find time for this.
July 2010
S M T W T F S
« Jun    
 123
45678910
11121314151617
18192021222324
25262728293031
SEO Powered by Platinum SEO from Techblissonline

Twitter links powered by Tweet This v1.6.1, a WordPress plugin for Twitter.