Midterm Flashcards

1
Q

copy file from personal PC to Matrix

A

scp filename server@matrix.senecacollege.ca:~/

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

Copy directory from PC to matrix

A

scp -r ~/dir server@matrix.senecacollege.ca:~/

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

List files and convert size to KB

A

ls -lh

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

Find a file

Find a file and export path to new file

A

find -iname “filename”

find -iname “filename” > filename2

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

Translate all lowercase letters to uppercase

Translate all commas to periods

A

tr “a-z” “A-Z” filename

tr “,” “.” filename

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

cut and display words separated by a comma in a file

A

cut -d’,’ filename -f2,4,6

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

cut and display words + translate commas to tab

A

cut -d’,’ filename -f2,4,6 | tr “,” “\t”

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

sort file numerically

A

sort -n filename

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

sort file backwards

A

sort -nr filename

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

sort file randomly

A

sort -R filename

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

search for word inside a file

A

grep “keyword” filename

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

Enter matrix server from PC

A

sftp server@matrix.senecacollege.ca

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

view files on server

view files on pc while on server

A

ls

!ls

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

download file from server to pc

A

get filename

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

upload file from pc to remote server

A

put song.mp3

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