Main Content

"Expecto Patronum" (or How I Learned To Stop Worrying And Love The Command Line)

Originally presented at the 2018 PNW Drupal Summit  --  The BADcamp version will have some new & revised spells, errr... content.

Linux commands are just grown-up versions of Harry Potter spells. They use strange-sounding commands. They can do some amazing things. They can get you into Big Trouble if misused. The documentation, mostly written by balding wizards with gray beards, is pretty ancient and difficult to understand.  And they can both be pretty scary.

But fear not, you can get comfortable with the command line in an hour.

Which is what we are going to do. This session demonstrates several powerful Linux command-line approaches to solving Drupal-related problems.

This session assumes you are familiar with Linux command-line basics, such as logging-in to a system, editing a text file, and creating/changing directories. 

The session covers the following areas:

  • Safety: Power tools can be extremely dangerous. Make backups, practice in sandboxes, and always have a recovery strategy in case something goes wrong.
  • Quickly copying files and directories between systems using scp and tar
  • Searching through dozens of compressed server logs for a particular string (zgrep, wc)
  • Chaning commands together with a pipe
  • Realtime monitoring and flitering of server logs (tailgrep)
  • Sending email from the command line -- with and without attachments (mail)
  • Manipulating graphics (convert)
  • Using history and bash aliases
  • Finding the location of a string anywhere in the Drupal file system or MySQL database (grep, fgrep)
  • Debugging: Finding exactly what databased changes occurred during a Drupal operation (mysqldumpdircmpdiff)
  • There's a Linux Command For That!  - Getting more information when you are hopelessly lost --  (manapropos)
  • How To Automate anything (cron)
  • Some Fun commands (fortunefigletcowsay)
Login to Register