We have listed here some multiple choice questions with answer on UNIX Operating System, Which has asked by multiple companies like Genpact, Syntel, Ericsson, Zensar, Virtusa etc.
You can prepare your job written and interview by using these sets of question fro here.
1. Multiple directories can be removed using single rmdir command.
2. Which one of the following commands is incorrect?
a) cat file01
b) cat > file01
c) cat >> file1
d) cat -a file01
3. What does the following command do?
cp -u * dir_file
a) copy all files to directory dir_file
b) update all files
c) delete all files
d) update all files in the current working directory and copy newer ones to directory dir_file
4. We can delete multiple files using single rm command.
5. Which command is used for renaming files?
6. Which option is used for backing up destination file in mv command?
7. How can we skip some initial bytes from both the files to be compared?
a) using –b option
b) using –n option
c) using –l option
d) using –i option
8. Which command is used to display the differences between files?
9. We cannot uncompress files using gzip.
10. What are links referred to as in file attributes?
a) number of filenames of a single file that are maintained by the system.
b) number of duplicates of a single file
c) number of copies of a single file.
d) number of files present in a directory
11. In how many categories are links divided?
12. If a file is read protected, we can write to the file.
13. A file has a permission set as 777 ie rwxrwxrwx but the directory permissions are 400. If the user tries to delete the file, will he be able to do it?
14. What is the default mode of vi editor?
a) Command mode
b) Input mode
c) Ex mode
d) Insert mode
15. Which one of the following key is used to switch from command mode to input mode?
16. The first UNIX editor was ____
17. The “ed” text editor is no longer in use.
18. Which command will be used to insert text at the beginning of the line?
19. To replace 5 characters with new characters, which one of the following will be used?
20. To replace the entire line irrespective of cursor position, we can use ____ command
21. To save the editing performed on a file, we have to switch to ______ mode
22. Which one of the following is the best way for saving and quitting the editor?
23. Which of the following is not a valid command?
a) : .,$w file002
b) :w 1,$ file002
c) : .w file002
d) : $w file002
24. To recover from a crash, we can use ____ command.
c) : x
d) :recover and -r
25. Which one of the following command is invalid?