File system

File names

Every file has a name. These are examples of file names:

data.txt
names.html
assignment-1.py
Experiment_12_a
CAT.GIF
letter.2020-12-03.docx

The filename must be unique in the directory it’s inside. You cannot have two files with the same name within the same directory.

You can give files almost any name you want… but it’s a good idea to only use letters and numbers (and maybe hyphen and underscore: - and _).

It’s inconvenient to work with files with spaces or other punctuation in them.

Filenames in Unix systems are case-sensitive, so it’s a good idea to simply keep all your filenames lower-case (unless there’s a specific reason not to).

The filename is only a name: it in no way affects what is in the file.