Examples assume you are inside your own new lab directory. Replace example names thoughtfully. Commands and filenames are case-sensitive.
| Command | Purpose | Example |
| pwd | Show current directory | pwd |
| ls | List directory entries | ls jupiter |
| cd | Change current directory | cd .. |
| mkdir | Create a directory | mkdir mars |
| mkdir -p | Create missing parent directories too | mkdir -p jupiter/io |
| cat | Display text-file contents | cat mars/mars.txt |
| mv | Move or rename | mv jupiter/europa/io.txt jupiter/io/ |
| cp | Copy | cp mars/mars.txt mars/mars-copy.txt |
| find | List matching paths recursively | find . -type f |
Create or replace a text file:
printf 'Mars\nA planet\n' > mars/mars.txt
Append one line:
printf 'Checked in Lab 1\n' >> mars/mars.txt
> replaces the destination's existing contents. >> adds to the end. Quoting keeps the text together; \n in the printf format produces a new line.
/ is the filesystem root. ~ expands to your home directory. . is the current directory and .. its parent. A filename extension such as .txt is part of the name.