Command Line Flashcards

1
Q

. command

A

current directory

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

.. command

A

previous directory

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

What is “" used for?

A

To escape a character

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

ls command

A

list the current filesystem

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

mv command

A

move a file

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

cp command

A

copy a file

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

what’s the difference between starting a filesystem with or without a “/”?

A

a starting / means it is an absolute path; not starting with one means a relative path

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

rm command

A

remove something

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

*

A

wildcard operator that matches any number of characters

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

-r

A

recursive option

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

find command

A

search for things

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

man command

A

brings up the manual

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

su command

A

substitute user: su <username> <password></password></username>

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

normal user privileges

A

can modify own stuff. can’t modify system stuff

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

root user privileges

A

You can modify anything. It is usually disabled

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

sudo command

A

briefly take command as a root user

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

why do file permissions have 9 slots?

A

3 groups of 3 permissions each. The groups are the current user, the group, and others. the type of permissions are read, write, and execute.

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

file permissions execute?

A

you can run the file as program

20
Q

chmod command

A

changes the permission mode string

21
Q

chown command

A

change the files owner

22
Q

chgrp command

A

change the file’s group

23
Q

how does octal file permission work?

A

each permission has a number: read: 4, write: 2, execute: 1. You add them all together ie if you have all permissions for user, you get 7. if you only have 5, you get read and execute. you will get a three digit number because you do permissions for user, group, and others all at once.

24
Q

How does symbolic file permission work?

A

user, group, and others are represented by u, g, and o. Read, write and execute are represented by r, w, and x. To add a permission, you get the person (u g o) and use the plus symbol. You can subtract a permission with minus. You can set a permission with equals. You can also change all permissions at once with a instead of u, g, or o.

25
Q

cat command

A

see the contents of a file

26
Q

touch command

A

make a file

27
Q

stat command

A

see a lot of information for a file

28
Q

nano command

A

lets you edit a file

29
Q

What is a link?

A

links are files that reference other files. they are pointers so you don’t need the file in multiple places

30
Q

What are the two types of links

A

hard and soft links

31
Q

ln command

A

makes a hard link.

32
Q

ln -s command

A

makes a soft link

33
Q

what is the pipe command?

A

|

34
Q

echo command

A

it prints out what you say

35
Q

What does pipe do?

A

lets you send your command to something else

36
Q

head command

A

see the beginning of a file

37
Q

tail command

A

see the end of a file

38
Q

less command

A

displays text one page or screenful at a time and provides navigation controls

39
Q

grep command

A

searches inside files according to a pattern, can be regex

40
Q

awk command

A

extracts specific text from a file

41
Q

sed command

A

is a stream editor

42
Q

rev command

A

prints text in reverse sequence

43
Q

tac command

A

concatenates or displays files in reverse

44
Q

tr command

A

translates or modifies individual characters according to parameters

45
Q

tar command

A

tape archive to bundle groups of files. Can also apply compression with an option

46
Q

tar -x command

A

extract a file

47
Q
A