<<< Previous | Back to beginning >>>
You've made it through your introduction to the command line! By now, you have experienced some of the power of communicating with your computer using text commands. The basic steps you learned today will help as you move forward through the week—you'll work with the command line interface to set up your version control with git and you'll have your text editor open while writing python scripts and building basic websites with HTML and CSS.
Now is a good time to do a quick review!
In this session, we learned:
- how to use
touch
andecho
to create files - how to use
mkdir
to create folders - how to navigate our file structure by
cd
(change directory),pwd
(print working directory), andls
(list) - how to use redirects (
>
) and pipes (|
) to create a pipeline - how to explore a comma separated values (.csv) dataset using word and line counts,
head
andtail
, and the concatenate commandcat
- how to search text files using the
grep
command
And we made a cheat sheet for reference!
When we started, we reviewed what text is—whether plain or enriched. We learned that text editors that don't fix formatting of font, color, and size, do allow for more flexible manipulation and multi-program use. If text is allowed to be a string of characters (and not specific characters chosen for their compliance with a designer's intention), that text can be fed through programs and altered with automated regularity. Text editors are different software than Bash (or Terminal), which is a text-based shell that allows you to interact directly with your operating system giving direct input and receiving output.
Having a grasp of command line basics will not only make you more familiar with how your computer and basic programming work, but it will also give you access to tools and communities that will expand your research.
What you have learned will be useful as you move forward through these tutorials. The command line will be immediately necessary for setting up your computer for version control with git in Introduction to git and GitHub! You'll find that knowing a few commands can help immeasurably as you find new tools to use.
In the DHRI Zotero Library, you'll see articles discussing command line tools that people in the humanities often use like:
MALLET (MAchine Learning for LanguagE Toolkit)
The DHRI Zotero Library includes articles about how and why you might want to use MALLET. If you complete our machine learning workshop and get a sense of how it works, you may want to explore this tool developed by and for digital humanities scholars.
The DHRI Zotero Library also includes articles about why plain text and markdown are good for academics and librarians. Pandoc calls itself a swiss army knife—it can convert many formats (markdown, HTML, LaTeX, and more) into HTML formats, word processor formats, EPUBS, pdfs, and more. Once you set up a workflow, you can use the same document to generate the various versions you might need for web and print. Pandoc is especially useful if you manage a publication which has both web and print manifestations. Pandoc can also integrate with Zotero citational software enabling automated citation management. (Imagine updating a reference in your Zotero Library so that it automatically updates all your citations in all your documents!)
These are just a couple of tools that the command line makes available to you. The command line is also useful for setting up installations of platforms like Omeka, "open source web publishing platforms for sharing digital collections and creating media-rich online exhibits," which you can read more about in the Introduction to Omeka workshop! If you want to create an Omeka site, you'll need to know how to navigate the file structure of your server. Commands like ls, mkdir, rmdir, cd, etc. are really important. For example, grep
could help you find a plugin directory that you might have accidentally placed in the wrong location.
That's the end of the command line session, but if you want to continue to learn about the command line, take a look at
or
review our glossary for the command line.
Here is an external command line tutorial if you wish to review and learn more.