Thursday, October 4, 2007

Hot Keys for bash shell

Ctrl + l - Clears the Screen.
Ctrl + r - Does a search in previously given commands in shell.
Ctrl + u - Clears the typing before the hotkey.
Ctrl + a - Places cursor at the beginning of the command at shell.
Ctrl + e - Places cursor at the end of the command at shell.
Ctrl + f - Move forward by one Character
Ctrl + b - Move back by one Character
Ctrl + k - Clear from the current cursor position to the end of the line
Ctrl + w - Clear (word )from the current cursor position to Prwevious white space
Ctrl + d - Kills the shell.
Ctrl + z - Places the currently running process into background.
Ctrl + c - Kill the Process
---------------------------------
Disk Usage of file sizes under each directory in current Directory ?
du -k * | sort -nr (or) du -k . | sort -nr
-------------------------------------------
Display the all files recursively with path under current directory ?
- find . -depth -print
---------------------------------------
List the file by file Size
ls -lrt | sort -nr
-------------------------
Display the parent/child tree of a process ?
ptree Example: ptree 1267
-----------------------------------------------
Show the working directory of a process ?
pwdx Example: pwdx 1267
------------------------------------------------
Display the processes current open files ?
pfiles Example: pfiles 1267