Wednesday, August 4, 2010

Unix Questions - Set 1-1

 

Question1

All Unix commands

  1. Must be in lower case
  2. Must be in upper case
  3. Must be in mixed case letters
  4. All of the above

Question 2

Unix operating system cannot run on which of the following Microprocessor?

  1. 8086
  2. 80286
  3. 80386
  4. Pentium

Question 3

Unix is

  1. Single user
  2. Multi-user
  3. Multitasking operating system
  4. Both B and C

Question 4

Which command is used for searching a given pattern in a file?

  1. Lookup
  2. Grep
  3. Find
  4. Search

Question 5

In which language Unix is written

  1. Perl language
  2. C language
  3. Pascal language
  4. None of the above

Question 6

Which of the following is a filter command?

  1. ls
  2. who
  3. cat
  4. find

Question 7

The bin directory contains

  1. Binary files
  2. Executable files for most of the Unix commands
  3. General application files
  4. None of the above

Question 8

Directory /dev contains

  1. user related files
  2. device related files
  3. command file
  4. temporary files

Question 9

Which of the following is true above Unix File System?

  1. It has a hierarchical file structure
  2. Files have access permissions
  3. All devices are implemented as files
  4. All of the above

Question 10

By default what are permissions given to the user when a file is created

  1. read
  2. write
  3. read and write
  4. None of the above

Question 11

Which of the following can be used for creating a file

  1. touch
  2. cat
  3. vi
  4. All of the above

Question 12

Identify the false statement about 'ln'

  1. When a file has two links, it is not physically present at two places, but can be referred by either of the names
  2. When a file has two links, it is physically present at two places, but can be referred by either of the names
  3. By default a file has one link
  4. By default a directory has two links

Question 13

The existing permissions of file can be changed by

  1. The super user
  2. The owner or group
  3. Others
  4. All of the above

Question 14

The exit status of Grep if it fails to find a match

  1. false
  2. true
  3. null
  4. None of the above

Question 15

Shell recognizes three types of commands

  1. external commands
  2. shell scripts
  3. internal commands
  4. All of the above

Question 16

Choose the correct option to create file "middle" consisting of keyword input sandwiched between the contents of two files start and end

  1. Cat start end - > middle
  2. Cat start - end < middle
  3. Cat start end - < middle
  4. Cat start - end > middle

Question 17

The correct way to send date and contents of file called "results" to file "final" is

  1. date ; cat results > final
  2. date | cat results > final
  3. (date ; cat results) > final
  4. (date, cat results) > final

Question 18

cp first second 2 > msg

  1. Errors are stored in file msg
  2. Syntax error
  3. Error message is printed on screen
  4. Contents of first and second are stored in msg

Question 19

To merge the standard error into the standard output

  1. 1 > &2
  2. 2 > &1
  3. 1& > 2
  4. 2 & > 1

Question 20

To compile demo.c and run, we can use

  1. cc demo.c ; a.out
  2. cc demo.c ; demo.exe
  3. cc -c demo.c ; a.out
  4. Both A and B

 

Answers

Answer 1 - A

Answer 2 - A

Answer 3 - D

Answer 4 - B

Answer 5 - B

Answer 6 - C

Answer 7 - B

Answer 8 - B

Answer 9 - D

Answer 10 - C

Answer 11 - C

Answer 12 - B

Answer 13 - B

Answer 14 - A

Answer 15 - D

Answer 16 - D

Answer 17 - C

Answer 18 - A

Answer 19 - B

Answer 20 - A

No comments:

Post a Comment