NWP lab3 Flashcards

1
Q

find . –name toto –print

A

Automatically find the file’s (path) by its name. Argument 1: (.) start search from current location Argument 2: name of the file is toto Argument3: show the location (path) on the screen

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

cd /etc

A

etc: location where there are files controlling the machines configuration like IP address. It is one of the system directories.

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

ls –rtl resolv.conf

A

Get detailed information about resolv.conf only

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

find / -name resolv.conf –print

A

Search the entire machine for file “resolv.conf” and print the path on the screen (usually the system does not allow, therefore you must log in the root)

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

find / -name resolv.conf –print | more

A

Show the output in pages because ( | more) is used

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

find / -name “*ress*” –print

A

This command is used if you are trying to find a file that you only remember a few letters of those letters are put in this letters “* *” the stars indicate any letter

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

find / -name “*ress*” –print > toto

A

Save the output of the search in file (toto). File toto is created automatically due to this command and the output is automatically in the file.

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

passwd

A

Change password

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

vi toto

A

Opens a file in root. (interactive viewer)

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

esc :q

A

To exit. Esc is used because there are two modes (writing and editing) therefore exiting editing mode and going to command mode.

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

esc dd esc 4dd

A

dd removes lines. dd removes 1 line while 4dd removes 4 lines.

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

esc u

A

Undo

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

esc x

A

Deletes one character. To delete i386 from /i386-pc put the indicator on the first letter you want to delete as shown (/i386-pc).

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

esc i

A

Insertion of text. (before the cursor) you can press esc to stop writing.

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

esc a

A

Insertion mode after the cursor.

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

esc o

A

Write in a new line.

17
Q

esc :w

A

Save in memory (write in memory).

18
Q

Esc shift g

A

Go to the end the file.

19
Q

Esc 1 shift g

A

Go to the beginning of the file.

20
Q

Automatically find the file’s (path) by its name. Argument 1: (.) start search from current location Argument 2: name of the file is toto Argument3: show the location (path) on the screen

A

find . –name toto –print

21
Q

etc: location where there are files controlling the machines configuration like IP address. It is one of the system directories.

A

cd /etc

22
Q

Get detailed information about resolv.conf only

A

ls –rtl resolv.conf

23
Q

Search the entire machine for file “resolv.conf” and print the path on the screen (usually the system does not allow, therefore you must log in the root)

A

find / -name resolv.conf –print

24
Q

Show the output in pages because ( | more) is used

A

find / -name resolv.conf –print | more

25
Q

This command is used if you are trying to find a file that you only remember a few letters of those letters are put in this letters “* *” the stars indicate any letter

A

find / -name “*ress*” –print

26
Q

Save the output of the search in file (toto). File toto is created automatically due to this command and the output is automatically in the file.

A

find / -name “*ress*” –print > toto

27
Q

Change password

A

passwd

28
Q

Opens a file in root. (interactive viewer)

A

vi toto

29
Q

To exit. Esc is used because there are two modes (writing and editing) therefore exiting editing mode and going to command mode.

A

esc :q

30
Q

dd removes lines. dd removes 1 line while 4dd removes 4 lines.

A

esc dd esc 4dd

31
Q

Undo

A

esc u

32
Q

Deletes one character. To delete i386 from /i386-pc put the indicator on the first letter you want to delete as shown (/i386-pc).

A

esc x

33
Q

Insertion of text. (before the cursor) you can press esc to stop writing.

A

esc i

34
Q

Insertion mode after the cursor.

A

esc a

35
Q

Write in a new line.

A

esc o

36
Q

Save in memory (write in memory).

A

esc :w

37
Q

Go to the end the file.

A

Esc shift g

38
Q

Go to the beginning of the file.

A

Esc 1 shift g