Linux MCQs with answers Page - 50

Here, you will find a collection of MCQ questions on Linux. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 833.24K Points
Coach

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

  • (A) fileAB, fileBC and fileABC
  • (B) fileA and fileB
  • (C) fileABC
  • (D) fileA, fileB and fileABC

A

Admin • 833.24K Points
Coach

Q. What will be printed for the command below?

Code:
$ 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 these

A

Admin • 833.24K Points
Coach

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

  • (A) uniq –I
  • (B) uniq -c
  • (C) uniq -d
  • (D) uniq -u

A

Admin • 833.24K Points
Coach

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

  • (A) grep -v ‘Bob’ files
  • (B) grep ‘[BOB]’ files
  • (C) grep ‘B[oO][bB]’ files
  • (D) grep –i Bob files

A

Admin • 833.24K Points
Coach

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

A

Admin • 833.24K Points
Coach

Q. Which command will you use to see the available routes?

  • (A) show route
  • (B) route status
  • (C) netstat -r
  • (D) None of these

A

Admin • 833.24K Points
Coach

Q. The permission -rwxr-xr-t represented in octal expression will be

  • (A) 2754
  • (B) 1754
  • (C) 1755
  • (D) 0777

A

Admin • 833.24K Points
Coach

Q. With a umask value of 112, what is the default permission assigned to newly created regular file?

  • (A) -rw-rw-r–
  • (B) -r-xr-x-r–
  • (C) -rw-rw-r–
  • (D) —x–x-wx

A

Admin • 833.24K Points
Coach

Q. Given the command $ chmod o-w datafile

  • (A) clears write permission to others for datafile
  • (B) clears write permission to everyone for datafile
  • (C) sets write permission to others for datafile
  • (D) sets write permission to everyone for datafile

A

Admin • 833.24K Points
Coach

Q. Which of these commands will set the permissions on file textfile to read and write for the owner, read for the group, and nothing for everyone else?

  • (A) chmod rw r nil textfile
  • (B) chmod 310 textfile
  • (C) chmod 640 textfile
  • (D) chmod 046 textfile

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ