Welcome to NetAndSys
Search command history on ubuntu PDF Print E-mail
Written by Jean Philippe   
Tuesday, 12 January 2010 00:00

Sometimes you want find a command you typed a while ago, let say a complex rsync

It is in fact, quite easy, just search the history by doing a grep:

---

~$ history | grep rsync

Last Updated on Thursday, 21 January 2010 20:30
 
Grep and Kill on Ubuntu PDF Print E-mail
Written by Marc   
Thursday, 21 January 2010 00:00

Let say you want to kill a process like Firefox but you want to do it in one simple line.

It means you have to grep for the process PID and then Kill the process in question:

---

$sudo kill -TERM `pgrep firefox | awk '{print $1}'`

---

Last Updated on Thursday, 21 January 2010 20:30
 

Resources

Key Concepts

Login Form