Digital Humanities, University of Bern Digital Humanities, University of Bern DH Lab
  • Lab
  • Programme
  • Assignment
  • Toolbox
  • Student Workflows
  • About
  • Intro to DH ↗
  1. Programme
  2. Session 2
  • Lab
  • Programme
    • Session 1
    • Session 2
    • Session 3
    • Session 4
    • Session 5
    • Session 6
    • Session 7
    • Session 8
    • Session 9
    • Session 10
    • Session 11
    • Session 12
    • Session 13
    • Session 14
  • Assignment
  • Toolbox
  • Student Workflows
    • How to add your workflow here
  • About

  • Introduction to DH (companion course)

On this page

  • In this session
  • The command line
  • Paths
    • File naming conventions
  • Data storage
  • Exercise
  • Edit this page
  • Report an issue
  1. Programme
  2. Session 2

Session 2

Get to know your computer

Author

Adrian Demleitner

Published

22 September 2026

Modified

2 September 2026

Demleitner Taught by Adrian Demleitner. Possibly with further colleagues.

In this session

  • The command line
  • Paths — absolute, relative, and why your script cannot find the file
  • Data storage — what actually happens when you save something

Bring your laptop. Everything in this session happens on your own machine.

The command line

  • Terminal, shell, prompt: what each word means
  • Where you are: pwd, ls / dir, cd
  • Making and moving things: mkdir, cp, mv, rm — and why rm deserves respect
  • Looking inside files without opening them: cat, head, less
  • Finding things: grep, find
  • Pipes and redirection: |, >, >> — combining small tools into a large one
  • Getting help: --help, man
WarningmacOS, Windows, Linux

The commands differ. On Windows, PowerShell and WSL behave differently again. We work through all three; find a neighbour on the same system.

Paths

  • Absolute versus relative paths
  • . and .., the home directory ~
  • Path separators, spaces in filenames, and why “Meine Arbeit Final (2).docx” causes trouble
  • Extensions, and the fact that they are only a hint
  • The PATH variable — why the computer sometimes says “command not found”

File naming conventions

A short set of rules that will save you hours later:

  • No spaces, no umlauts, no special characters
  • YYYY-MM-DD for dates, so that sorting by name sorts by time
  • Consistent, meaningful prefixes
  • Version in the name only if you are not using version control — from next week, you are

Data storage

  • Files and file systems, directories as a tree
  • Bytes, encodings, and why a text file opens as gibberish (UTF-8, and everything before it)
  • Plain text versus binary formats: which of your files can you still open in twenty years?
  • Local, external, network, cloud — where “the file” actually is
  • Backups: the 3-2-1 rule, and the difference between a backup and a sync

Exercise

Working entirely from the command line: create a project directory with a sensible structure, put a text file in it, find it again with find, search inside it with grep, and copy the result somewhere else. Then delete the whole thing and rebuild it — faster.

TipIn parallel in the Intro

What is DH? · What is data? · Zotero introduction

Back to top
Session 1
Session 3
  • Edit this page
  • Report an issue