terminal Flashcards

1
Q

copy files?

A

cp source destination

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

download files?

A

wget source

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

unzip files?

A

unzip filename.zip

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

gzip files?

A

tar -czvf name.tgz ~/dir

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

unzip tgz files?

A

tar -xzvf ~/dir.tgz

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

可用空格翻页

A

More

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

将输出值传入

A

|

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

输出值写入并覆盖文件

A

>

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

输出值连缀在文件内容后面

A

> >

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

recursively, for all files under that directory

A

-R

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

remove files?

A

rm file1 file2

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

remove a directory?

A

rm -v dir

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

create nested directories?

A

mkdir -p a/b/c

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

what does -rwxrwxrwx mean?

A
  • means it’s a file, rather than a directorythey’re user, group, othersrwx: read, write, execute (must be executable)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

change mode, user could read/write, group could read?

A

chmod u=rw,g=r file

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

concatenate file? 连结

A

cat xx.txt

17
Q

connect server xx.xx.x.xx with user

A

ssh user@xx.xx.x.xx

18
Q

copy files to server?

A

short for safe copy:scp [source] [destination]scp xx.txt server:/dir