5 Superfast Linux Command Line Shortcuts

Those who are deep into Linux know how powerful the command line is and once you get used to it, nothing is as easy as doing stuff from command line. So if you are someone who spends most of their time on command line, here we bring to you some handy short cuts which will not only save your time but will also make your interaction with the Linux command line much more interesting

  1. Use pipe |

    The standard output of a command can be piped to some other command using pipe |.

  2. Use * and ?

    The wild-card character * is used to match against any number of characters while the character '?' is used to match against a single character. Infact both * and ? can be used together as well

  3. Run multiple commands together

    If you are working on something that requires execution of 2-3 commands repeatedly, then this can be done by either using a script or by using ; on command line.

  4. Jump to last working directory

    There can be times where while working on command line you are required to jump between two separate directories. Using the standard cd command followed by the complete path can be a bit time taking. For these situations you can use the 'cd -' command.

  5. Use !! and !

    Double and single exclamation marks make interesting short cuts on Linux command line. While double exclamations represent the last command that was run, single exclamations can be used to either display or run any command whose name is mentioned along with the exclamation mark.

    Next, single exclamations are also extremely useful. A single exclamation can be used with a command-name to either show or run the last used command that used the command-name.

    ![command-name]:p displays the last run command that used [command-name]

    ![command-name] actually re-runs the last run command that used [command-name]

    So that's how !! and ! are of great use when used as Linux command line short cuts.

Comments

Popular posts from this blog

Reduce TIME_WAIT Socket Connections