Quiz: The command line
Seven questions on paths, the commands of the command line and starting a Python program.
In which folder is the file C:\Users\anna\Documents\uni\notizen.txt?
The last part of a path is the name of the file, and the part before it is
the folder the file sits in directly. uni in turn sits in Documents.
Which of these paths are absolute? (several are right)
An absolute path starts at the root, on Windows with a drive such as C:\,
on the Mac with /. The other two only apply from a particular folder and
are relative.
The prompt reads PS C:\Users\anna\Documents\uni>. Where are you after cd ..?
.. stands for the folder one level above the current one. From uni
that is Documents.
Which command shows you which files are in the current folder?
ls lists the content of a folder. pwd only gives the path of the
current folder, cd changes it, and cat shows the content of a file.
What does mv report.txt report-final.txt do?
If the target is not an existing folder but a new name, mv renames the
file. A copy is only created with cp.
You deleted a file with rm by mistake. Where do you find it?
rm deletes immediately and without asking, and the recycle bin belongs to
Explorer and Finder, not to the command line. At most, the file can be
restored from a backup.
python hallo.py answers with can't open file … No such file or directory. What is the most likely cause?
Python has started, otherwise the message would not come from Python, and
it has not even read the file yet, so a typo in it would not show up so
far. It looks for hallo.py in the current directory, and the file is not
there.
Download with answers: CSV Anki
Details
- Level
- Beginner
- Modules
- Digitization and Programming
- In learning paths
- The command line
- Code
4904- Updated
- 1 November 2026
- Status
- published