- The Docs
- Getting To Know You
- What Is The Command Line Anyway
- Getting Started
- Workshops
- Where Do You Go From Here
- Learning More, Reference And Tools
- About Us
Let's zip around the room to get an idea of who you are, what you do and what you want to learn
An alternative to accessing files and opening directories and files through a graphical user interface. Oh, and there are some fun tools there too.
Why should I learn this... Efficiency...!
This #NICAR15 hands-on session aims to help beginners learn some basic commands in the command line interface (CLI) that can help them every day, including navigating through directories, creating files and tools to look at and work with structured data. If you're familiar with grep and curl this will likely be review. We'll end by highlighting some command line libraries that are musts for reporters, and provide additional resources so participants can go deeper on their own.
- If you're using Mac OS or Linux you'll be OK with the standard terminal application.
- On Mac OS click on the spotlight search on the topright of your screen, type "terminal" and open the CLI.
- Many Mac OS users use an application called iTerm2 which offers additonal features.
- On a Windows machine you can open the CLI by opening the Start Menu and clicking the Run item. In the box that appears, type the letters cmd. This should open up your CLI.
- Windows users also have the option of installing Cygwin which brings the Unix CLI to Windows. You will want to make sure that curl is installed.
- On a Windows machine you can also install VirtualBox and Vagrant to get an *nix machine up and running. That is beyond the scope of this session.
- On Mac OS click on the spotlight search on the topright of your screen, type "terminal" and open the CLI.
- tab completion: use to finish command, directory or file names, or to see directories or files that match
- ctrl + a: move to the beginning of a line
- ctrl + e: move to the end of a line
- ctrl + c: terminate a command that is running
- up arrow: cycle back through previous commands
- redirection - >
- Take the output of a file and create a new file with it
- append - >>
- .....
- piping - |
- .....
-
Get an idea? Go explore!!!
-
Other NICAR15 sessions
- Liz Lucas taught an introductory session on command line for Windows.
-
- Matt Kiefer taught a command line tools class in Windows using Cygwin.
- Agustin Armendariz and Kendall Taggart offered up Useful command line tools for reporters
- Use terminal through a virtual machine. Check out this from the Center for Investigative Reporting.
-
Learn more commands
- Many of the commands we detailed in this session represent the basics, some of the foundational sorts of things you can do to begin to be proficient. But there are many more, and a discussion post-#NICAR14 highlighted many of them. They include:
- Noah Veltman's The Command Line Murders: Teaching the Terminal with a Detective Noir
- Melody Kramer wrote this guide for using GitHub from the command line.
- The Art of the Command Line
- Over the wire terminal game
- Terminus game
- Code Academy Learn the Command Line
- The Command Line Crash Course
- Unix tools
- UNIX tricks
- Working With CSVs On The Command Line
- Linux Command-Line Cheat Sheet
- Basics of Getting Around
- Command Line Fu
- Unix commands for exploring data
- Advanced command line tricks using json and XML and CSVs
- The $PATH to Enlightenment
- csvkit:
- "a suite of utilities for converting to and working with CSV, the king of tabular file formats."
- Getting it installed if
pip install csvkit
doesn't sound persuasive - Using it to trim NYC DOB complaint records down to a manageable size tutorial
- Using it to trim NYC's City Planning data down a ton notes
- csv de dupe:
- homebrew
- Jue Yang
- AJ Vicens
- Reporter at Mother Jones
- @AJVicens
- Chris Keller (ckeller@scpr.org)
- Data editor and news applications developer at KPCC, the NPR affiliate in Pasadena, Calif. Chris joined KPCC in 2012 after spending more than 15 years in various print and digital roles at newspapers of various sizes in the Midwest.
- GitHub
- @ChrisLKeller