Page 143 - DCAP106_OPERATING_SYSTEM_TOOLS
P. 143

Operating System Tools




                    Notes
                                     Ctrl + W                Delete the word before the cursor.

                                     Ctrl + K                Clear the line after the cursor.
                                     Ctrl + T                Swap the last two characters before the cursor.
                                     Esc + T                 Swap the last two words before the cursor.
                                     Alt + F                 Move cursor forward one word on the current line.
                                     Alt + B                 Move cursor backward one word on the current line.
                                     Complete recent         Try this: Type “!” followed by the first couple of letters of a
                                     commands with “!”       recent command and press ENTER! For example, type:
                                                             find /usr/bin -type f -name m\*
                                                             and now type:
                                                             !fi
                                     Tab                     If you type a partial command or filename that the shell
                                                             recognizes, you can have it automatically completed for you
                                                             if you press the TAB key. Try typing the first few characters
                                                             of your favourite Linux command, then hit TAB a couple of
                                                             times to see what happens.
                                     “history” command       Show your complete command history.
                                     Up/Down Arrow Keys      Scroll through your most recent commands. You can scroll
                                                             back to an old command, hit ENTER, and execute the
                                                             command without having to re-type it.

                                     Scrolling the screen with   Scroll back and forward through your terminal.
                                     Shift-
                                     PageUp and Page Down






                                      Notes  This is to note that some of these commands may not work if you are accessing
                                     BASH through a telnet/ssh session, or depending on how you have your keys mapped.



                                   Self Assessment

                                   Fill in the blanks:
                                   9   The default shell on most Linux operating systems is called ........................................
                                   10.   A shortcut Ctrl + T is used to Swap the last two ........................................ before the cursor.

                                   11.   Shortcut ........................................ clears the line before the cursor position.
                                   8.3 Command Line Syntax


                                   Commands can be run by themselves, or you can pass in additional arguments to make them do
                                   different things. Typical command syntax is given below:

                                   command [-argument] [-argument] [--argument] [file]






          136                              LOVELY PROFESSIONAL UNIVERSITY
   138   139   140   141   142   143   144   145   146   147   148