Backend and Infrastructure

Handy Command Line Shortcuts

Sprout Video

This video covers some handy tips for reusing previously run commands and moving around through a line of text in the command line interface. These shortcuts make working on the command line much faster and nicer. Trying to remember all of these is not easy to do until you've used them for a while, so we also have a handy-dandy cheat sheet which you can find in the Downloads tab and refer to whenever you are in command line ninja mode. There are always new shortcuts you can learn. Another great shortcut !$.. It's similar to !!, but instead of repeating the last command, it repeats the last argument given. This sequence of commands shows how the shortcut could be used: mkdir sites/default/files followed by chmod a+w !$. That would be the same as typing out chmod a+w sites/default/files

Note: this video was originally released July 9, 2010 on Lullabot.com.

Note: In some places the command line prompt is cut-off. The YouTube version of this video doesn't have the cut-off problem. We are working on getting this fixed, but in the meantime, check out the YouTube version instead.

Command Line Basics 12: Handy Command Line Shortcuts (youtube.com)

Command Line Tools for Drupal