Unix MCQ of Computer Science SET-14 with Answers free PDF Download

We have provide here is the list of Unix MCQs for Computer Engineering preparation competitive exams. Each question has four options followed by the right answer.

MCQ Questions for Unix of Computer Science with Answers

Q1. Which of the following commands is used to summarize the disk usage?

(i) chkdsk
(ii) fdisk
(iii) du
(iv) disk

(iii) du

Q2. Which command is used with vi editor to move cursor forward to first occurrence of character ‘ch’ in the current line?

(i) tch
(ii) fch
(iii) rch
(iv) ech

(ii) fch

Q3. Which command is used to display the end of the file?

(i) head – r
(ii) tail
(iii) eof
(iv) bof

(ii) tail

Q4. Which command is used to set the three permissions for all the three categories of users of a file?

(i) chgrp
(ii) chown
(iii) chmod
(iv) chusr

(iii) chmod

Q5. Which of the following is invalid filename?

(i) shutry
(ii) TRY
(iii) trial
(iv) None of the above

(iv) None of the above

Q6. Which of the following commands is used to list contents of directories?

(i) ls
(ii) lp
(iii) dir
(iv) tar

(i) ls

Q7. The special shell variable $* is used

(i) To exit status of last command executed
(ii) To process number of the current shell
(iii) To list the positional parameters
(iv) To name the command being executed

(iii) To list the positional parameters

Q8. The File that contains a set of instructions which are performed when a user logs in, is

(i) .exrc
(ii) .profile
(iii) .autoexec
(iv) autoexec.bat

(ii) .profile

Q9. In Bourne shell, which file sets the Unix environment for the user when the logs into his HOME directory.

(i) .exrc
(ii) .profile
(iii) lastlogin
(iv) .mbox

(ii) .profile

Q10. Which command is used to change protection mode of files starting with the string emp and ending with 1,2, or 3?

(i) chmod u+x emp[1-3]
(ii) chmod 777 emp*
(iii) chmod u+r ??? emp
(iv) chmod 222 emp?

(i) chmod u+x emp[1-3]

Q11. The cat command is used to

(i) Capture a file
(ii) Display a file
(iii) Print a file
(iv) Copy a file

(ii) Display a file

Q12. Which command is used to concatenate all files beginning with the string ’emp’ and followed by a non-numeric characters?

(i) cat emp[!0-9]
(ii) more [emp][!0-9]
(iii) cat emp[x-z]
(iv) cat emp[a-z]

(i) cat emp[!0-9]

Q13. Which command is used with vi editor to save file and remain in the editing mode?

(i) :q
(ii) :w
(iii) q!
(iv) 😡

(ii) :w

Q14. Which command is used to extract specific columns from the file?

(i) cat
(ii) cut
(iii) grep
(iv) paste

(ii) cut

Q15. Which command is used to display all the lines with the string ‘sales’ from the file empl.lst?

(i) cut sales empl.lst
(ii) /sales > empl.lst
(iii) grep sales empl.lst
(iv) cat | /sales > empl.lst

(iii) grep sales empl.lst

Q16. Which command is used to delete all files in the current directory as well as all files and sub-directories in its subdirectories?

(i) rm *
(ii) rm -r *
(iii) rm all
(iv) rm .

(ii) rm -r *

Q17. Which of the following set options is used with vi editor to ignore case while searching for patterns?

(i) ic
(ii) ai
(iii) sm
(iv) ts

(i) ic

Q18. Which of the following keys is used to overstrike a whole line?

(i) R
(ii) v
(iii) C
(iv) u

(i) R

Q19. The Octal number to be given along with chmod command to make a file readable, writable and executable to the owner, readable and executable to group and others is:

(i) 000
(ii) 755
(iii) 744
(iv) 555

(ii) 755

Q20. If a file has read and write permissions for the owner, then the octal representation of the permissions will be

(i) 1
(ii) 6
(iii) 5
(iv) 3

(ii) 6

We hope the given Computer Engineering MCQ Questions for Unix with Answers PDF Free Download will help you. If you have any queries regarding Unix MCQs Multiple Choice Questions with Answers, drop a comment below and we will get back to you soons.

Leave a Comment