Welcome. This site is designed for me, Chad Chenault, as a place to store information. You are free to browse around and reuse any code that I put on the site as long as you keep the code GPLv3.  All communication on this site are SSL encrypted (private browsing) and your data is not tracked or stored intentionally.

My blog is at blog.chadchenault.com

Old blog at http://chadchenault.blogspot.com/

Linux Command Line Information

  • Ctrl+U – clear all the current line from the end to the beginning only if the cursor is at the end of the line.
  • Ctrl+Y recall the cleared line
  • Ctrl+K – clear all the current line from the beginning to the end only if the cursor is at the beginning of the line.
  • Ctrl+E Ctrl+U – move the cursor to the end of the line and clear all the current line from the end to the beginning.
  • Ctrl+A move the cursor at the beginning of the line
  • Ctrl+C – cancel the current command line, which implies clear all the current line no matter where the cursor is. Disadvantage: you can’t recall the cleared line anymore.
  • Alt+Shift+# – comment the current line, keep it in the history and bring up your prompt on a new line.
  • Bash History Recall
    •  ! followed by the first few letters of the command, if you know you haven’t executed any commands with the same starting letter sequence since.
    • !? followed by a unique string appearing anywhere in the command. The unique string doesn’t have to be at the start of the command.
    •  ctrl-r. This will put you into history search mode. Must use before you begin typing your command.
      • Just pressing Enter will immediately recall and execute the command.
      • ctrl-j or Escape will retrieve the command, but allow you to continue editing.
      • ctrl-g or ctrl-c cancels the current command.
  • history | grep -i “<search string>” –  get a list of all related commands with their history numbers.
  • !<history number> – execute command specifically by its number.

Command line tool for managing wordpress at http://wp-cli.org/

Leave a Reply

Your email address will not be published. Required fields are marked *