Search

9/12/2011

Master the Linux bash command line with these 10 shortcuts | TechRepublic

Master the Linux bash command line with these 10 shortcuts | TechRepublic

4. Use key shortcuts to efficiently edit the command line
bash supports anumber of keyboard shortcuts for command-line navigation and editing. The Ctrl-A key shortcutmoves the cursor to the beginning of the command line, while the Ctrl-E shortcutmoves the cursor to the end of the command line. The Ctrl-W shortcutdeletes the word immediately before the cursor, while the Ctrl-K shortcutdeletes everything immediately after the cursor. You can undo a deletion with Ctrl-Y.

8. Perform calculations
bash can performsimple arithmetic operations at the command prompt. To use this feature, simplytype in the arithmetic expression you wish to evaluate at the prompt withindouble parentheses, as illustrated below. bash will attemptto perform the calculation and return the answer.

bash> echo $((16/2))
8

沒有留言: