Tips and Tricks for interactive use
Ergonomics is important.
Use
TABcompletion whenever possible:it saves keystrokes
it validates what you are trying to type (if autocompletion does not work, probably you’ve made a typo or a file you are trying to )
Arrow up/down: go backwards/forwards in history
Use
&&to chain commands and create groups of commands that can be reused
History expansion: do not repeat yourself
Use
CTRL-R/Sto incrementally search backwards/forwards in history!!is the last commandUse
history | grep <command-fragment>to search for a command and get its number!<n>is then-th command in the history,shopt -s histverify: show the command before executing itYou can do other crazy things. Search for
HISTORY EXPANSIONinman bash.
Suggestions?
Are you willing to discuss and share your own ergonomic tricks?
Feel free to edit this page!