Top 150+ Solved Linux Programming MCQ Questions Answer

From 136 to 150 of 196

Q. The asterisk is a meta-character which in the command "ls *.txt" means

a. Any single character

b. Any combination of one or more characters

c. Any combination of zero or more characters

d. None of the above

  • a. Any single character

Q. Which command runs the shell built-in command ‘command’ with the given argument?

a. builtin

b. caller

c. there is no command present for this purpose

d. none of the mentioned

  • a. builtin

Q. Which command generates possible completions for string according to the and write it tostandard output?

a. compgen

b. complete

c. continue

d. none of the mentioned

  • a. compgen

Q. Which of the following is not a iterative construct in "bash"?

a. If

b. For

c. Until

d. While

  • c. Until

Q. Assuming the files fileA, fileB, fileAB, fileBC and fileABC, exist in a directory, which files match with the pattern file[ABC]?

a. fileA, fileB and fileABC

b. fileABC

c. fileA and fileB

d. fileAB, fileBC and fileABC

  • c. fileA and fileB

Q. What will be printed for the command below?$ grep –c “^echo” abc

a. The count of lines that do not contain the pattern echo in file abc

b. The count of lines which begin with the pattern echo in file abc

c. The count of lines that ends with the pattern echo in file abc

d. None of the above

  • b. The count of lines which begin with the pattern echo in file abc

Q. Which one is used to select only one copy of the repeated lines?

a. uniq -u

b. uniq -d

c. uniq -c

d. uniq –I

  • a. uniq -u

Q. Indicate the right option to search for BOB, Bob, BOb or BoB?

a. grep –i Bob files

b. grep ‘B[oO][bB]’ files

c. grep ‘[BOB]’ files

d. grep -v ‘Bob’ files

  • b. grep ‘B[oO][bB]’ files

Q. Indicate the right option to search for anything not a letter or number

a. grep ‘^[a-zA-Z0-9]’

b. grep ‘[^a-zA-Z0-9]’

c. grep ‘[a-zA-Z0-9]’

d. None of the above

  • b. grep ‘[^a-zA-Z0-9]’

Q. One of the entry of /etc/passwd file is shown below: user1:x:1111:2222:McqMate:/home/user1:/bin/bash Which among the following will print userid and home dir in the following pattern “user1:/home/user1”

a. awk `{print $1 “:” $6}` /etc/passwd

b. awk `{print $1 “:” $7}` /etc/passwd

c. awk `{print $2 “:” $6}` /etc/passwd

d. awk `{print $2 “:” $7}` /etc/passwd

  • a. awk `{print $1 “:” $6}` /etc/passwd

Q. FIFO Stands For :

a. Figure in Figure Out

b. First in First Out

c. File input File Output

d. None

  • b. First in First Out

Q. The set of possible names for a given type of IPC is called its

a. Process

b. Name Space

c. Connect

d. Communication

  • b. Name Space
Subscribe Now

Get All Updates & News