Prerequisites Flashcards

1
Q

absolute path

A

/home/mgk25/wg/teaching/unixtools/Makefile

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

relative path

A

f2.txt or wg/teaching/ or ../../proj/phd.tex

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

print current working directory: pwd

A

pwd – starting point whenever you provide just a filename / subdirectories to descend into

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

synonym for cwd

A

single dot

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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 .

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

text editor

A

emacs path, nano path

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

deleting a file:

A

rm path

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

make a new directory: mkdir path

A
  • makes new directory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

deleting an (empty) directory: rmdir path

A
  • without special options, rm cannot delete a directory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

leave:

A

exit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Remote login

A

SSH

- linux.cl.ds.cam.ac.uk,

How well did you know this?
1
Not at all
2
3
4
5
Perfectly