What are files, and how can we work with them from the command line? How can we continue to work collaboratively?
We’ve learned how to:
mkdir in Linux/Unix or New-Item -ItemType Directory in PowerShellcd and pwd OR Set-Location and Get-Locationls OR Get-ChildItemtouch OR New-ItemBut what exactly are files?
The Many File Formats
A file is a collection of data stored in a single unit, identified by a filename.
Files can be:
The file extension is the part of the file name after the period.
| Extension | Type |
|---|---|
.docx |
Microsoft Word document |
.jpg |
Image file |
.mp3 |
Audio file |
.txt |
Plain text file |
.md |
Markdown file |
Proprietary formats are owned by a company, like how Microsoft Word owns the format of .doc or .docx, which means a file with that extension can only be read in Word.

To be clear, .doc was invented in 1983 along with the first version of the software for Microsoft Word which ran on MS-DOS, whereas .docx was only introduced in 2007 as part of an XML-based update to the software.
Open source formats can be opened by many programs and are not owned by one company.
.txt files work with any text editor.csv files work with any spreadsheet softwareA Word Document and a .txt file might look the same…
But Word contains hidden formatting that .txt does not.
In programming, we want to be explicit - so plain text is preferable.
According to the Unicode Standard:
Plain text is a pure sequence of character codes; plain Unicode-encoded text is therefore a sequence of Unicode character codes.
Key concept: Plain text shows if it is formatted or not (we call this markup), and usually contains no formatting.
Plain text is:
Edited in a text editor like VS Code

curl Commandcurl = “client URL” - downloads files from the internet> = redirect output to create a new file.txt file with the book’s textUsing WSL or Git Bash:
cat = concatenate
wc = word count-w flag = count words-l flag = count lines
How many times does “pride” appear?
Result: 43 times
Your turn: How many times does “prejudice” appear?
| Command | What it does |
|---|---|
curl / wget |
Download files from the web |
cat |
Display file contents |
wc -w |
Count words |
wc -l |
Count lines |
grep |
Search for text |
grep -c |
Count occurrences |
What do you know about Markdown?
.md)README.md files!Like .txt, but with lightweight formatting capabilities.
Put two asterisks on either side:
Renders as: Computing in the Humanities is defined as …
Put one asterisk on either side:
Renders as: Computing in the Humanities is defined as …
Put a hashtag in front:
Different levels:
# = Heading 1## = Heading 2### = Heading 3Markdown Preview
Click the preview icon in VS Code’s top right corner
Plain text is future-proof
Can be rendered by any text editor
GitHub renders Markdown automatically
README.md displays on repository pagesMarkdown was created by John Gruber with Aaron Swartz in 2004.
The goal was to create a file format that was easy to read and write, could be converted into web documents, and could be used by anyone. You can read more about the history of Markdown, in Bednarski, Dawid. “The History of Markdown: A Prelude to the No-Code Movement.” Taskade Blog, March 25, 2022. https://www.taskade.com/blog/markdown-history/.

Created by GitHub in 2009
Adds features like:
CommonMark is another popular Markdown style and improvements to it are discussed in this repository https://github.com/commonmark/commonmark-spec/issues.
Currently, your README.md is your first assignment Init IS310 Homework. But what be some problems with this approach?
README.md should indicate structure of repo, not be one assignmentinit_is310However, that is not very sustainable for the course since all your assignments will be in that folder. So, your first goal is to clean up your repository so that your first homework assignment has it’s own folder init_is310, which contains your initial README.md and any images.
Then you will create a new README.md file in the root of your is310-coding-assignments that will be the main home page for your homework repository.
Try adding:
Bonus: Add a link to our course website!
Push your changes to GitHub when done!
This assignment has two goals:
Your maze should be themed around your cultural data topic of interest.
Create a command line maze themed around your cultural data topic of interest for your group members to solve! First, you should create a new folder in your is310-coding-assignments repository called command-line-maze. Inside this folder, you should create a maze using directories and files.
Your maze should have:
Include a README.md in your maze folder:
Do NOT zip the README!
Mac/Linux/WSL:
is310-coding-assignments repoNeed inspiration? Try the example maze
Once your maze is posted, solve at least two mazes from students in your group!
Steps:
cat README.md)Mac/Linux/WSL:
| Command | Use Case |
|---|---|
cd |
Navigate through directories |
ls |
See what’s in each directory |
ls -la |
Find hidden files/directories |
cat |
Read file contents |
pwd |
Check current location |
For each of the two mazes you solve:
Pay attention to how your group members framed their cultural data topic!
Remember:
curl/wget, cat, wc, grep for text workSee also: Command Line Cheatsheet