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.
1 Comments (Post a Comment)