#separator:tab #html:true #tags:command-line-quiz #columns:Front Back
In which folder is the file C:\Users\anna\Documents\uni\notizen.txt?
Documentsuninotizen.txtC:\uniThe 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)
C:\Users\anna\DocumentsDocuments\uni/Users/anna/Documents..\picturesC:\Users\anna\Documents/Users/anna/DocumentsAn 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 ..?
C:\Users\annaC:\Users\anna\Documentsuni, because .. is not a folder nameC:\C:\Users\anna\Documents.. 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?
pwdlscdcatlsls 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?
report-final.txt is created, and the original stays.report-final.txt, and there is no report.txt any more.report-final.txt.report-final.txt, and there is no report.txt any more.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?
.trash of the current directoryrm 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?
hallo.py is in.hallo.py is in.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.