Linux - 013 Linux Bash Tips
0xa Linux Bash Commands which helps me most in my daily work.1. cd -, swaps take you to the last cd last location
2. cd, Change to home directory
3. pushd, pushes the current directory path into stack and later you can use popd to go back to that location, use dirs to display the stack
4. fg, mainly for programmers who are editing and compiling the from command line. Eg. Start vim make some changes to the file use :w to save the contents press Ctrl-Z that process will get stopped. Now compile the code then use fg to bring back that to foreground.. Use jobs to see all stopped process and use bg to run those in background.
5. Ctrl-L, to clear the screen.
6. Ctrl-R to reverse search the previous commands
7. !xyz will execute the last xyz command with all the previous arguments.
8. Ctrl-A to go to the beginning for the line, Ctrl-E to the end of the line,
9. Ctrl-U erase all characters backward, Ctrl-W erase a word backward
10. shopt -s cdspell, will correct minor errors in cd command.
Posted by - at 8:14 am | 2 comments read on
Windows - Debugging Tools
I would like to mention few very good debugging tools which were very useful for me.All the below links correspond to 32 bit platforms, go to those links they says it all.
1. Debugging Tools for Windows
2. Debug Diag
3. Dependency Walker
4. Process Explorer
5. DebugView
6. JXplorer - For LDAP related stuffs
Labels: Win32
Posted by - at 8:01 am | 0 comments read on
Update....
I will be posting my articles in both K5REC as well as cprogrammers.
Posted by - at 8:10 am | 0 comments read on
Windows - Memory Leak Analysis using Windbg
Windbg is a tool from the house of MS. It come handy when debugging in a production enviornment as it is light weight. I have been using Windbg for the last few weeks and I would like to share some tips.Let us start of with memory leak analysis!
Download Location: Debugging Tools For Windows
Windbg has build in extension exts.dll which can used to find memory leaks. Here are the steps. Enable Stack backtrace from your executable using gflags.exe +ust /i
1. Start your program and start leaking your application
2. Run WinDBG and attach to the your process. (windbg.exe -pn
3. From the WinDBG command line do a !heap -stat, this will list down all the active heap blocks
4. Then do a !heap -stat -h
5. Now do a !heap -flt s
6. Then do a !heap -p -a < address >, address is the User Addr then you will get the stack trace; from where you have allocated that much bytes.
Good luck guys!!
Let your RAM Rest In Peace.
Labels: Win32
Posted by - at 7:51 am | 4 comments read on