Skip to main content
Back to module
STEM Foundations: The Universal Skill Stack · Computing & Data Fluency

Files, the command line, and spreadsheets

Reading39mLesson 1 of 3 in this module

What you'll learn

  • Organise files and sort a table of data
  • Name files with ISO dates and keep raw data untouched and backed up
  • Move around folders with pwd, ls, cd and mkdir
  • Lay out a clean spreadsheet table and summarise it with formulas

Organise project files, try the command line, and sort and summarise a table of data.

Why this matters

Every STEM job produces files: lab results, drawings, photos of a job site, code, data exports, reports. If you cannot find last month's calibration log or you overwrite the only copy of a data set, the work is lost no matter how good it was. Three basic computing skills save hours every week: organising files, using the command line for simple tasks, and working with spreadsheets to sort and summarise data.

Organising files

Your computer stores files in folders (also called directories) arranged in a tree. Every file has a path that says where it lives, for example:

C:\Users\sam\Projects\pump-test\data\2026-10-23-run1.csv      (Windows)
/Users/sam/Projects/pump-test/data/2026-10-23-run1.csv         (macOS / Linux)

A simple structure that works for almost any project:

pump-test/
  data/        raw data, never edited by hand
  analysis/    spreadsheets or scripts that work on the data
  reports/     what you share with other people
  photos/
  README.txt   one paragraph: what this project is and where things are

Naming rules that prevent pain:

  • Put dates first in ISO format, YYYY-MM-DD, so files sort in date order: 2026-10-23-pump-run1.csv.
  • Use letters, numbers, hyphens and underscores. Avoid spaces and symbols like / \ : * ? " < > |, which break some tools.
  • Be descriptive: 2026-10-23-pump-run1.csv beats data_final_v2_REAL.csv.
  • Keep raw data untouched. Work on a copy, so you can always go back.
  • Back up important work in at least two places (for example your computer and a cloud drive).

The command line, briefly

The command line (Terminal on macOS and Linux, PowerShell or Command Prompt on Windows) lets you control the computer by typing commands. It looks old-fashioned, but it is fast, repeatable and used heavily in software, data, cloud and lab automation work. A few commands go a long way:

TaskmacOS / LinuxWindows PowerShell
Where am I?pwdpwd
List fileslsls (or dir)
Change foldercd datacd data
Go up one foldercd ..cd ..
Make a foldermkdir reportsmkdir reports

The command line does exactly what you type, with no undo. Be careful with commands that delete (rm, del) and double-check the path first. The git-and-command-line course covers this properly.

Spreadsheets: data in rows and columns

A spreadsheet (Excel, Google Sheets, LibreOffice Calc) stores data in a grid. Each column is one kind of information and each row is one record. Good data tables follow a few rules:

  • One header row with clear names and units: date, sample_id, temperature_C.
  • One record per row. Do not merge cells or leave blank rows in the middle.
  • One kind of value per column. Do not mix "12" and "twelve" or "12 C".

Sorting reorders rows by one column (for example highest temperature first). Always select the whole table before sorting, or use the header's filter button. If you sort one column alone, its values get separated from the rest of their row and the data is scrambled.

Filtering hides rows that do not match a condition, without deleting them.

Formulas start with = and calculate from other cells:

=AVERAGE(C2:C21)        mean of cells C2 to C21
=MAX(C2:C21)            largest value
=COUNTIF(D2:D21,"FAIL") how many rows say FAIL
=C2*1.8+32              convert a Celsius value in C2 to Fahrenheit

Worked example

You have 20 readings from a pump test in a CSV file. You save it into pump-test/data/ with a dated name, open a copy in analysis/, add a header row with units, select the table and sort by flow rate from highest to lowest. You add =AVERAGE(...) and =MAX(...) under the flow column and write one line in README.txt saying where the raw file came from. Anyone (including you in six months) can now follow what you did.

Common mistakes

  • Sorting one column on its own, which breaks every row.
  • Editing the only copy of raw data.
  • Vague filenames like final2.xlsx.
  • Mixing units or text in a number column, which breaks formulas.
  • Deleting from the command line without checking the path.

Quick recap

  • Use a clear folder structure, ISO dates and descriptive filenames; keep raw data untouched and backed up.
  • The command line is precise and repeatable; learn pwd, ls, cd and mkdir first.
  • Spreadsheet tables need one header row, one record per row and one kind of value per column.
  • Select the whole table before sorting, and use formulas instead of typing results by hand.

Try it

Open the Do tab. You will set up a small project folder and sort and summarise a table of data in a free spreadsheet tool.

Key terms (6)

path
The address of a file that lists the folders leading to it, such as /Users/sam/Projects/pump-test/data.
ISO format
The YYYY-MM-DD date format, which makes dated filenames sort in date order.
command line
A text interface, such as Terminal or PowerShell, where you control the computer by typing commands.
sorting
Reordering a table's rows by the values in one column; select the whole table so each row stays together.
filtering
Hiding the rows that do not match a condition, without deleting them.
formula
A spreadsheet entry starting with = that calculates a value from other cells.

Recap

  • Use a clear project folder structure, ISO dates and descriptive filenames
  • Keep raw data untouched, work on a copy and back up in at least two places
  • Start on the command line with pwd, ls, cd and mkdir, and check the path before deleting anything
  • Good tables have one header row, one record per row and one kind of value per column
  • Select the whole table before sorting, and calculate with formulas instead of typing results
Also in this lesson: