Search your BASH History on-the-fly
Press ctrl-r and type the first one or two letter of the command that you are looking for, and it will find the last executed command for your user which match. Type more letters to qualify the search even further, or press ctrl-r again, to find the next match.
If you are not already familiar with this, you will ask yourself very soon, how you managed to live without it!
Find and Kill a Background Job the Fast Way
Show Last Exit Status
To check the exit code of the last executed program, use "echo $?". Example
[johan@centos66 ~]$ ./my_script.sh --option=invalidValue
[johan@centos66 ~]$ echo $?
It's customary in the unix-world that 0 means "program executed successfully", and everything else means that the program failed in some way.
Go to Last Directory
Just use the command "cd -" to go to the directory you were in last!
[johan@centos66 tmp]$ cd -