← CSE107 lab materials

CSE107 · Prelab 1 · Files and paths on Ubuntu

Download editable Word worksheet (.docx)

Fall 2026 · Review version 1 · Preparation for Friday 2 October 2026

Release: Friday evening, 25 September. Due: Thursday, 1 October; exact time and submission format will be announced on Teams. Suggested preparation: 20–30 minutes. No Arduino or programming is required.

Name: __________________ Student ID: __________________ Group: __________

1. Read the folder diagram

A directory contains files or other directories. Your terminal has a current directory. An absolute path starts at /; a relative path starts from the current directory. .. means the parent directory, and ~ refers to your home directory when expanded by the shell.

planets/
  mars/
    mars.txt
  jupiter/
    io/
    europa/
  saturn/
    saturn.txt

Starting in planets/jupiter/io, write the relative path to:

- The jupiter directory: __________________

- The saturn directory: __________________

- The file mars/mars.txt: __________________

Explain what pwd, ls and cd each do in one short sentence. You may consult their help or the lab command reference.

2. Predict before running

printf 'Mars\n' > note.txt
printf 'A planet\n' >> note.txt
cat note.txt

What two lines should appear? What would change if the second command used > instead of >>? Do not run this in a directory containing a file you need to keep.

3. Revisit binary

Convert 10110 from binary to decimal. Write decimal 13 as a four-bit binary pattern. Show place values; no signed-number encoding is required.

4. Readiness

Can you access Ubuntu and open a terminal? Record yes/no and any difficulty. A lack of home access should be reported to the TA for access/support arrangements; it does not require buying or reinstalling a computer.

Bring your answers and one question to recitation/lab. Follow the instructor's announced collaboration and AI-use rules; this draft introduces no new permissions or restrictions.