Command Line Flashcards

(47 cards)

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
cat command
see the contents of a file
26
touch command
make a file
27
stat command
see a lot of information for a file
28
nano command
lets you edit a file
29
What is a link?
links are files that reference other files. they are pointers so you don't need the file in multiple places
30
What are the two types of links
hard and soft links
31
ln command
makes a hard link.
32
ln -s command
makes a soft link
33
what is the pipe command?
|
34
echo command
it prints out what you say
35
What does pipe do?
lets you send your command to something else
36
head command
see the beginning of a file
37
tail command
see the end of a file
38
less command
displays text one page or screenful at a time and provides navigation controls
39
grep command
searches inside files according to a pattern, can be regex
40
awk command
extracts specific text from a file
41
sed command
is a stream editor
42
rev command
prints text in reverse sequence
43
tac command
concatenates or displays files in reverse
44
tr command
translates or modifies individual characters according to parameters
45
tar command
tape archive to bundle groups of files. Can also apply compression with an option
46
tar -x command
extract a file
47