1.2 Given a scenario, manage files and directories Flashcards

1
Q

sed command

A

stream editor; ability to filter text in a pipeline.

-d –delete
-n,p – print lines that contain pattern
-s – substitute first string occurrence
-s,g – globally substitute og string with replacement string for each occurrence

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

awk command

A

find and replace text
-F – field separator
-f – file
-v – assign a variable

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

printf command

A

Provides the user with more control over how the output is formatted
-v assign output to a variable

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

dd command

A

convert and copy a file; used to take a bit-by-bit image

-if=FILE – input file
-of=FILE – output file

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

stat command

A

Display file or file system status
-L – deference
-f – file-system
-c – format

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

file command

A

determine file type

-b – brief
-C – compile
-e – exclude

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

rsync command

A

Used to copy file locally and to remote systems

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