Unix/Lunux MCQ Quiz Hub

Linux Mcqs Questions Set 6

Choose a topic to test your knowledge and improve your Unix/Lunux skills

Which command executes ‘command’ in place of the current process instead of creating a new process?





✅ Correct Answer: 1

Which one of the following statement is not true?





✅ Correct Answer: 2

Which command is used to close the vi editor?





✅ Correct Answer: 3

In vi editor, the key combination CTRL+f





✅ Correct Answer: 1

Which vi editor command copies the current line of the file?





✅ Correct Answer: 2

Which command is used to delete the character before the cursor location in vi editor?





✅ Correct Answer: 1

Which one of the following statement is true?





✅ Correct Answer: 2

Which command searches the string in file opened in vi editor?





✅ Correct Answer: 1

In vi editor, which command reads the content of another file?





✅ Correct Answer: 3

Which command shows all the abbreviations in vi editor?





✅ Correct Answer: 1

Which command sets the number for all lines?





✅ Correct Answer: 3

What is sed?





✅ Correct Answer: 1

Sed maintains the hold space (a buffer) to





✅ Correct Answer: 2

Which is the correct syntax for sed on command line?





✅ Correct Answer: 1

If any sed command does not specify any address then the command is applied to





✅ Correct Answer: 1

If no file is specified in sed command then





✅ Correct Answer: 2

Which sed command deletes the specified address range





✅ Correct Answer: 3

Which command is used to replace word ‘cat’ (already present in the file) with ‘mouse’ at all places in a file ‘old.txt’ and save the result in a new file ‘new.txt’?





✅ Correct Answer: 1

Which command will delete all the blank lines in file old.txt?





✅ Correct Answer: 3

The command “sed -n ‘/sanfoundry/p’ old.txt” will





✅ Correct Answer: 1

Which option is used by sed to specify that the following string is an instruction or set of instructions?





✅ Correct Answer: 1

Which one of the following is not true?





✅ Correct Answer: 4

An awk program can be run by





✅ Correct Answer: 4

Which one of the following is not true?





✅ Correct Answer: 4

What is the meaning of $ sign in awk programming?





✅ Correct Answer: 2

In awk program, the statement “print” with no items





✅ Correct Answer: 3

The print and printf statements can be told to send their output to other place except standard output, is called





✅ Correct Answer: 1

The command “awk {print $1} san.txt” will





✅ Correct Answer: 2

What is the output of the command awk ‘BEGIN {printf “%c ”,65}’





✅ Correct Answer: 1

Which one of the following statement is not true about the format-control letters for printf statement in awk program?





✅ Correct Answer: 3

What is expression in awk programming?





✅ Correct Answer: 3

Which one of the following is not true?





✅ Correct Answer: 4

All numeric values are represented within awk in





✅ Correct Answer: 1

Concatenation is performed by





✅ Correct Answer: 1

The comparison expression x ~ y will true if





✅ Correct Answer: 3

The break statement





✅ Correct Answer: 4

Which statement skips over the rest of the loop body, causing the next cycle around the loop to begin immediately?





✅ Correct Answer: 1

The next statement





✅ Correct Answer: 3

If the argument is supplied to the exit statement,





✅ Correct Answer: 1

Which statement instructs gawk to stop processing the current data file?





✅ Correct Answer: 2

The command awk {if (“9″>”10”) print sanfoundry else print linux}





✅ Correct Answer: 3

Which one of the following statement is not true?





✅ Correct Answer: 3

What is the difference between the built-in functions rand() and srand() in awk programming?





✅ Correct Answer: 2

Which built-in function returns the arctangent of a/b in radians.





✅ Correct Answer: 1

Which built-in function divides string into pieces seperated by fieldsep and stores the pieces in array?





✅ Correct Answer: 1

The built-in function tolower()





✅ Correct Answer: 2

In awk, the built-in variable FS is





✅ Correct Answer: 1

What is FNR?





✅ Correct Answer: 1

RSTART is set by invoking the





✅ Correct Answer: 1

Which one of the following is used by awk to control the conversion of numbers to string?





✅ Correct Answer: 2