A directory holds names for files and other directories. Starting in a new empty disposable working directory, we can create a place for notes and then a file inside it:
mkdir notes
touch notes/plan.txt
ls -l notes/plan.txt
mkdir creates the directory. touch creates the file if it is absent; if it already exists, touch normally updates timestamps instead of emptying its contents. The listing shows its metadata. mkdir -p notes/meetings also creates missing parent directories and accepts an existing directory; it does not check whether those directories contain files you meant to protect.
A text editor is usually the clearest way to add and revise longer text. Open notes/plan.txt in a graphical editor or the optional terminal editor in the next lesson, write a line, save it, and inspect the saved file with cat notes/plan.txt. An editor may hold changes in a memory buffer until saving; closing without saving can discard those changes. A failed save deserves investigation of its path and permissions, not an automatic retry as administrator.
For a small known example, the shell can write command output to a file:
printf 'First version\n' > notes/plan.txt
cat notes/plan.txt
printf 'Another line\n' >> notes/plan.txt
cat notes/plan.txt
The first cat prints First version; the second prints that line and Another line. The shell opens the destination before running printf. This result assumes writing is permitted and Bash’s noclobber option is off (the usual default). Some shell settings refuse to overwrite an existing regular file instead; do not rely on them to protect data. > creates a missing file or truncates an existing one, so it replaces the contents even if the command later fails. >> appends instead. Both require a writable destination and an existing parent directory. Quote paths containing spaces, for example cat 'notes/meeting plan.txt'. Neither approach is a backup.