GETTING A CLUE 
AT THE COMMAND LINE 
E M M A J A N E H O G B I N W E S T B Y 
drupal.org/user/1773 
@emmajanehw 
http://bit.ly/getting-a-clue
1. Start by understanding 
how you’ll benefit. 
2. Group functionality and 
map it to things you 
already know. 
3. Play the pre-game to 
learn the moves. 
4. It’ll be okay. Don’t panic.
too long; didn’t listen 
tl;dl 
It’s because there are no pictures. 
You’ll need to learn to make your own.
How People Think 
30% visual/spatial 
45% visual + words 
http://rebloggy.com/post/spoilers-mine-sherlock-bbc-sherlock-sherlock-spoilers-his-last-vow-lars-mikkelse/73135846244 
25% words 
http://en.wikipedia.org/wiki/Visual_thinking
http://www.mobygames.com/game/amiga/dune-ii-the-building-of-a-dynasty/screenshots/gameShotId,142587/
$ _
http://en.wikipedia.org/wiki/Palace
start by understanding 
how you’ll benefit
goal: consistency
so what? 
copy-paste-able 
commands
so what? 
it’s easily 
converted to a script
so what? 
scripts can be 
automated
so what? 
automation means 
fewer mistakes
group functionality and 
map it to things you 
already know
1. task runners 
2. scaffolding 
3. package managers
task runners 
Task runners are a set of tools to make build 
operations consistent, clean and well 
documented. They provide helpers to manage 
operations on the project file system via the 
command line.
http://en.wikipedia.org/wiki/Ball_boy
Examples of Task Runners 
• Front end: grunt, gulp, (npm), broccoli, brunch 
• Linux: Make
scaffolding 
Design time scaffolding produces files of code that 
can later be modified by the programmer to 
customize the way the application database is used.
http://en.wikipedia.org/wiki/Lego_Star_Wars
Examples of 
Scaffolding 
• Tangibles: Lego kit 
• Front end dev: Yeoman 
• Drupal: base theme (with starter theme) 
• Linux: Make
Scaffolding 
Common Tasks 
• create an empty shell site 
$ yo webapp 
• create a new site 
$ compass create my_project
package managers 
A package management system, also called 
package manager, is a collection of software tools to 
automate the process of installing, upgrading, 
configuring, and removing software packages for 
a computer's operating system in a consistent 
manner.
Examples of 
Package Managers 
• OSX: Mac App Store, MacPorts, brew 
• Linux: dpkg, RPM 
• Front End Dev: npm, Bower, RubyGems
Package Manager 
Common Tasks 
• locate software 
$ brew search git 
• install software 
$ brew install git 
• check if updates are available 
$ brew update! 
• install latest version 
$ brew upgrade git
Create Your Mental Palace 
Sport 
Package 
Manager 
Scaffolding Task Runner 
Generic 
download, install 
environment 
create new 
instance 
automate tasks 
Tennis 
builds a tennis 
stadium 
Sets up the 
tennis net 
Retrieves the 
ball during the 
game. 
Front end dev bower yeoman grunt 
???
play the pre-game 
to learn the moves
Good command line utilities 
make you feel smart. 
• The help sub-command includes a functional, 
not alphabetical, grouping of tasks. 
• Always gives an output to the screen after running. 
• Provides tips on customisation, and “next steps”.
Tips for Navigating 
• To navigate past commands, use the arrow keys. 
• To list past commands, type: history. 
• To repeat a previous command, use !history# 
• To search for past commands, use CTRL-r.
Tips for Typing Commands 
• Auto-complete what you’re typing with the tab key. 
• To delete a word in your command, use CTRL-w. 
• To jump to the beginning of the line, use CTRL-a. 
• To jump to the end of the line, use CTRL-e.
Pro Tip 
remap your caps lock key on OSX
Finding 
the Command Line
Command Line Interface 
http://en.wikipedia.org/wiki/Command_Prompt
$ _
Determining Input
define:prompt 
• a transitive verb meaning To move to action. 
? forward 90 
> open mailbox
define:command 
verb! 
• give an authoritative or peremptory order. "a gruff 
voice commanded us to enter” 
noun! 
1. an authoritative order. "he obeyed her commands 
without question" 
2. the ability to use or control something.
Commands 
One-word actions: 
• sing 
• jump 
• look 
One-word commands: 
• help 
• exit 
• history
Commands with Parameters 
An action, and a direct object:! 
• take book 
• read pamphlet 
• open window 
Commands with parameters:! 
• cd /var/www 
• man <command_name> 
• mv current_name.jpg new_name.jpg
Commands with Parameters 
and Modifiers 
Refining the request:! 
• go down stairs 
• take blue pill 
• open left door 
Adding a flag/switch/modifier:! 
• mkdir -p directory/sub-directory 
• tar xvf file_to_extract.tar.gz 
• ls -lh
Ten Commands
“all” commands 
http://www.commandlinefu.com/commands/browse 
This site includes a “rating” function.
It’ll be okay. 
Don’t panic.
read outputs in both 
directions.
the reptile brain
The type of output can change depending 
on the commands you’re running. 
Read outputs in both directions.! 
• Information from the program you just ran: 
read top to bottom 
• Printed summary of actions taken: 
read bottom to top
http://en.wikipedia.org/wiki/Palace
1. Start by understanding 
how you’ll benefit. 
2. Group functionality and 
map it to things you 
already know. 
3. Play the pre-game to 
learn the moves. 
4. It’ll be okay. Don’t panic.
WHAT DID YOU THINK? 
E V A U L A T E T H I S S E S S I O N - W R I T T E N F E E D B A C K F O R M S 
FOR MORE INFORMATION 
drupal.org/user/1773 
@emmajanehw 
http://bit.ly/getting-a-clue

Getting a CLUE at the Command Line