How to set command alias in Linux?

I came from the Windows world and uses cls to clear the terminal screen. So, I wanted to add a global alias for the cls command. To add the alias, you have to make an entry to the .bashrc file in the Home folder.

global_keybindings not working in Ubuntu 9.04

You can create hotkeys for the most commonly used programs in Linux by following the steps:
  • Launch gconf-editor by typing in a terminal: gconf-editor.
  • In gconf-editor choose apps » metacity » global_keybindings.

How to check whether two files are equal in Linux?

There are so many ways to check whether two binary files are equal. One of the way, is to calculate the MD5 Hash of the file and compare it with the MD5 hash of the another file.

md5sum first.so
md5sum second.so

The other slightly better is to do the diff of the files, using the diff command.

diff first.so second.so

Aardvark: Mozilla Firefox Add-ons

Powerful and user-friendly selector utility for selecting elements and doing various actions on them. It can be used for cleaning up a page prior to printing it (by removing and isolating elements), and for web development.
  • Clean up unwanted banners and surrounding "fluff," especially prior to printing a page
  • See how the page is created, block by block
  • View the source code of one or more elements
Download Link:

How to play region coded DVD in computer?

The best way to do is to play the DVD in VLC, a free media player. VLC media player is a highly portable multimedia player for various audio and video formats (MPEG-1, MPEG-2, MPEG-4, DivX, mp3, ogg, ...) as well as DVDs, VCDs, and various streaming protocols. It can also be used as a server to stream in unicast or multicast in IPv4 or IPv6 on a high-bandwidth network.

How to check dependencies of any executable file?

In Windows, you can use the Dependency Walker to scans any 32-bit or 64-bit Windows module (exe, dll, ocx, sys, etc.) and builds a hierarchical tree diagram of all dependent modules. For each module found, it lists all the functions that are exported by that module, and which of those functions are actually being called by other modules.

How to make Git ignore files and directories?

When you run the git status command, it will show all files that are not yet committed or added to staged area. There are so many temporary files and folders which you don't want to add to the source control repository.

How to create Git shortcut aliases?

Open the config file in the .git directory, in the project base directory and create an alias section and append aliases to it, one per line.

vi .git/config

[core]
      repositoryformatversion = 0
      filemode = true
      bare = false
      logallrefupdates = true
[alias]
      ci = commit
      st = status
      co = checkout
      b = branch
      l = log
      d = diff
      cmesg = log --pretty=format:"%s"

How to check the Ubuntu version currently running?

Run the following command to view the version of the Ubuntu/Linux running on that machine:

cat /etc/issue
Ubuntu 9.04 \n \l

In RedHat based systems, you can issue the following command to know the OS release/version:

cat /etc/redhat-release
Enterprise Linux Enterprise Linux AS release 4 (October Update 5)

How to disable warning in g++ in Linux?

When you embed an .xpm file to some C++ project in Linux, you will get tons of harmless warnings.

warning: deprecated conversion from string constant to ‘char*’

You can disable such warning in the project on global basis, by adding -Wno-write-strings to the g++ command line arguments.