Trickmaker | Solution to hidden treasure of technology
Register or
Login with Facebook for commenting
RSS Trickmaker Home Page Print the Page Mobile Version Trickmaker Desktop Version Trickmaker
advertisement

Be a Guest Blogger

Saturday, January 1, 2011

Type less do more, killing application, system monitor & R for remember in Terminal

By
Pin It
advertisement
Share It
-----------------------






Type less do more:

This one is self-explanatory and a huge timesaver, just look at the example below.

$ cd /digit/long/path/pain/to/type/again
cd: /digit/long/path/pain/to/type/again: No
such file or directory
$ mkdir !*
mkdir /digit/long/path/pain/to/type/again!* 

works with any command and not just mkdir to run it with same arguments as the command before it.

Killing applications:

On issue of kill -9 Process_id the application with that particular process_id (pid) will get killed no matter how badly it is hung. To find the PID of any application type the following

$ ps –e | grep app_name

You don’t even need to type in the full application name, for example typing just fire for firefox would do. If you find the above process too tedious you can also use the less powerful but more convenient killall command $ killall application_name

A word of caution if you type the following command $ kill -9 -1, it will kill all processes that you have the privileges to kill.


System monitor:

If you’re not satisfied with merely killing an application from the command line and want to see where your system resources are going in detail, then Htop is a neat little application for that. Since it is universally present in the default repositories it can be easily installed. On a Debian-based distribution (include Ubuntu) this can be done by issuing the followingsudo apt-get install htop. You can view processor/memory usage of all application, change their processing priority, kill them and much more with Htop.

R for remember:

Finally we had reserved the best for the last. All of us have found ourselves looking for that awesome command we typed two days or two minutes back by continuously pressing the up arrow key, but not finding it. Press [Ctrl] + [R] in your bash shell. Type in the first few letters of the command you’re looking for it will immediately match the command you are looking for from your history (which you can view by issuing the history command) and you can execute it by pressing [Enter].


Attachments:


If you LIKE this, then copy the below and put this in your WEBSITE or BLOG