Prerequisites Flashcards
1
Q
absolute path
A
/home/mgk25/wg/teaching/unixtools/Makefile
2
Q
relative path
A
f2.txt or wg/teaching/ or ../../proj/phd.tex
3
Q
print current working directory: pwd
A
pwd – starting point whenever you provide just a filename / subdirectories to descend into
4
Q
synonym for cwd
A
single dot
5
Q
listing a directory
A
: ls or ls -la or ls path
if file starts with . ls doesn’t show it, -la … l = long format, a = all files including ones starting with .
6
Q
text editor
A
emacs path, nano path
7
Q
deleting a file:
A
rm path
8
Q
make a new directory: mkdir path
A
- makes new directory
9
Q
deleting an (empty) directory: rmdir path
A
- without special options, rm cannot delete a directory
10
Q
rename or move a file or directory: mv oldpath newpath
A
- if mv between different filesystems first copies then deletes
- otherwise, on same file system it’s constant time
- mv is used to rename a file … moving to a new name in the same directory
- can be used to replace a file – mv will atomically overwrite the target file
11
Q
leave:
A
exit
12
Q
Remote login
A
SSH
- linux.cl.ds.cam.ac.uk,