Unix Question Bank / FAQs
This is a mock Exam for the Unix programmers. It is created by Genesis InSoft Limited (admin@genesisinsoft.com) and may be freely
distributed so long as it is unmodified. Please email us if you have any corrections or
comments.
Question1
All Unix commands
- Must be in lower case
- Must be in upper case
- Must be in mixed case letters
- All of the above
Answer to Question 1
Question 2
Unix operating system cannot run on which of the following Microprocessor?
- 8086
- 80286
- 80386
- Pentium
Answer to Question 2
Question 3
Unix is
- Single user
- Multi-user
- Multitasking operating system
- Both B and C
Answer to Question 3
Question 4
Which command is used for searching a given pattern in a file?
- Lookup
- Grep
- Find
- Search
Answer to Question 4
Question 5
In which language Unix is written
- Perl language
- C language
- Pascal language
- None of the above
Answer to Question 5
Question 6
Which of the following is a filter command?
- ls
- who
- cat
- find
Answer to Question 6
Question 7
The bin directory contains
- Binary files
- Executable files for most of the Unix commands
- General application files
- None of the above
Answer to Question 7
Question 8
Directory /dev contains
- user related files
- device related files
- command file
- temporary files
Answer to Question 8
Question 9
Which of the following is true above Unix File System?
- It has a hierarchical file structure
- Files have access permissions
- All devices are implemented as files
- All of the above
Answer to Question 9
Question 10
By default what are permissions given to the user when a file is created
- read
- write
- read and write
- None of the above
Answer to Question 10
Question 11
Which of the following can be used for creating a file
- touch
- cat
- vi
- All of the above
Answer to Question 11
Question 12
Identify the false statement about 'ln'
- When a file has two links, it is not physically present at two places, but can be
referred by either of the names
- When a file has two links, it is physically present at two places, but can be referred
by either of the names
- By default a file has one link
- By default a directory has two links
Answer to Question 12
Question 13
The existing permissions of file can be changed by
- The super user
- The owner or group
- Others
- All of the above
Answer to Question 13
Question 14
The exit status of Grep if it fails to find a match
- false
- true
- null
- None of the above
Answer to Question 14
Question 15
Shell recognizes three types of commands
- external commands
- shell scripts
- internal commands
- All of the above
Answer to Question 15
Question 16
Choose the correct option to create file "middle" consisting of keyword input
sandwiched between the contents of two files start and end
- Cat start end - > middle
- Cat start - end < middle
- Cat start end - < middle
- Cat start - end > middle
Answer to Question 16
Question 17
The correct way to send date and contents of file called "results" to file
"final" is
- date ; cat results > final
- date | cat results > final
- (date ; cat results) > final
- (date, cat results) > final
Answer to Question 17
Question 18
cp first second 2 > msg
- Errors are stored in file msg
- Syntax error
- Error message is printed on screen
- Contents of first and second are stored in msg
Answer to Question 18
Question 19
To merge the standard error into the standard output
- 1 > &2
- 2 > &1
- 1& > 2
- 2 & > 1
Answer to Question 19
Question 20
To compile demo.c and run, we can use
- cc demo.c ; a.out
- cc demo.c ; demo.exe
- cc -c demo.c ; a.out
- Both A and B
Answer to Question 20
Answers
Answer 1 - A
Back to question 1
Answer 2 - A
Back to question 2
Answer 3 - D
Back to question 3
Answer 4 - B
Back to question 4
Answer 5 - B
Back to question 5
Answer 6 - C
Back to question 6
Answer 7 - B
Back to question 7
Answer 8 - B
Back to question 8
Answer 9 - D
Back to question 9
Answer 10 - C
Back to question 10
Answer 11 - C
Back to question 11
Answer 12 - B
Back to question 12
Answer 13 - B
Back to question 13
Answer 14 - A
Answer 15 - D
Back to question 15
Answer 16 - D
Back to question 16
Answer 17 - C
Answer 18 - A
Answer 19 - B
Back to question 19
Answer 20 - A
Back to question 20
|