CYB-270 CH:8

0.0(0)
studied byStudied by 1 person
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/31

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

32 Terms

1
New cards

Which text editor is default on Linux systems

vi/vim

2
New cards

How do you access command mode in vi/vim

ESC

3
New cards

How do you access insert mode in vi/vim

(i)

4
New cards

How do you get into extended mode in vi/vim

(:)

5
New cards

While in command mode in vi/vim what key can you use to repeat the most recent change you made

(.)

6
New cards

What command can you use to undo an action you just performed

(u)

7
New cards

What command can you use to search for a string in a file

(/)thing

8
New cards

How can you save changes without quitting

:w

9
New cards

What 3 ways can you save changes and quit

:wq :x ZZ

10
New cards

How can you copy text from an existing file into a current one

:r filename

11
New cards

What 2 methods can you use to execute a command without leaving the editor

:!commandName, Ctrl + Z and fg to return back into vim

12
New cards

What ways can you use to get help with vim

:help, man vi, :!man vi (within vi)

13
New cards

What do you add at the beginning of a shell script to let the system know a script is being started

#!/bin/sh

14
New cards

Before a file can be ran what command can you use to change the permissions

chmod 755 file OR chmod u+x file

15
New cards

Variables can only contain letters numbers and what special character

(_) underscore

16
New cards

What is the proper syntax for initializing a variable

variableName=variableValue

17
New cards

How can you display the contents of a variable

echo $variableName

18
New cards

How can you assign a variable to be read only

readonly variableName

19
New cards

What can you do to remove a stored variable

unset variableName

20
New cards

What is a way that you can add 2 variables containing an integer together

sum=$(expr $varOne + $varTwo)

21
New cards

What is the correct format for conditional expressions

[ $a == $b ] the spaces must be included

22
New cards

What command shows a list of processes with the current login session

ps

23
New cards

What could you use to check if variable A is equal to the contents in variable B

[ $A -eq $B ]

24
New cards

What signifies the end of a case statement

esac

25
New cards

What signifies the end of an if statement

fi

26
New cards

What looping mechanism tests the loop condition each time

while

27
New cards

What is the syntax to run a script named filesort

./filesort

28
New cards

How many different modes are there in the vi editor

3

29
New cards

In Linux, __________ structure simplifies selection of a match when you have a list of choices

case logic

30
New cards

What could you use to quit a file without saving in vi

:q!

31
New cards

In _____________, a control structure repeats until a specific condition exists or some action occurs

Looping logic

32
New cards

In Linux, the ______ statement is used to terminate the execution of the entire loop, after completing the execution of all of the lines of code until that statement.

break