Genesis Insoft The name you can TRUST
twitterlogo facebooklogo
Home  |  Contact Us |  Careers
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

To get the PID of last background process

  1. echo $#
  2. echo $!
  3. echo $0
  4. echo $$

Answer to Question 1

Question 2

The -v option of sh causes the shell to

  1. Debugs if shell script has any error
  2. Does nothing
  3. Echo each command before it is executed
  4. Gives verbal output

Answer to Question 2

Question 3

The option to o test for zero length string is

  1. -s
  2. -z
  3. -a
  4. -d

Answer to Question 3

Question 4

A file is identified by _____ associated with it

  1. Inode number
  2. Process-id number
  3. Group-id number
  4. User-id number

Answer to Question 4

Question 5

The default value of umask is

  1. 777
  2. 644
  3. 022
  4. 422

Answer to Question 5

Question 6

Which of the following command is used to find the largest capacity of a file (maximum bytes a file can hold)

  1. Umask
  2. Ulimit
  3. FLargeLimit
  4. None of the above

Answer to Question 6

Question 7

Using ___ you can accept input from the standard input, process it and send the output to the standard output

  1. Filters
  2. Pipe
  3. Both A and B
  4. None of the above

Answer to Question 7

Question 8

What is the internal value associated with the standard error device?

  1. 0
  2. 1
  3. 2
  4. None of the above

Answer to Question 8

Question 9

Block commands work

  1. On group of lines
  2. On single line
  3. On a single file
  4. None of the above

Answer to Question 9

Question 10

In which of the following modes vi (editor) works

  1. Command mode
  2. Insert mode
  3. Ex command mode
  4. All of the above

Answer to Question 10

Question 11

Which commands help in viewing lines at the beginning or at the end of the file?

  1. Touch and cat
  2. Head and tail
  3. Touch and head
  4. Cat and tail

Answer to Question 11

Question 12

Which of the following commands are used to save disk space?

  1. Ulimit
  2. Compress
  3. Pack
  4. Both B and C

Answer to Question 12

Question 13

What is the command for viewing a compressed file?

  1. cat
  2. touch
  3. zcat
  4. acat

Answer to Question 13

Question 14

Password created for a user is stored in a file

  1. /dev/passwd
  2. /usr/passwd
  3. /etc/passwd
  4. /bin/passwd

Answer to Question 14

Question 15

Which of the following is true?

  1. A DOS formatted floppy can be used in Unix and a Unix formatted floppy can be used in DOS
  2. A DOS formatted floppy can be used in Unix but a Unix formatted floppy cannot be used in DOS
  3. A Unix formatted floppy can be used in DOS but a DOS formatted floppy cannot be used in Unix
  4. None of the above

Answer to Question 15

Question 16

Which of the following is a metacharacter?

  1. m>
  2. &&
  3. $1..$9
  4. All of the above

Answer to Question 16

Question 17

Block command works in

  1. Command mode
  2. Insert mode
  3. Ex command mode
  4. All of the above

Answer to Question 17

Question 18

How can you create hidden files in Unix

  1. *filename
  2. .filename
  3. $filename
  4. #filename

Answer to Question 18

Question 19

What happens when the following command is executed?
(date; banner welcome; ls)> one 2>two

  1. date along with the banner and list of all the files is written into files one and two
  2. date along with the banner and list of all the files is written only into file two
  3. date along with the banner and list of all the files is written only into file one
  4. syntax error

Answer to Question 19

Question 20

Which of the following command is used to execute commands at specified date and time?

  1. nohup
  2. cron
  3. fgrep
  4. None of the above

Answer to Question 20

Answers

Answer 1 - B

Back to question 1

Answer 2 - C

Back to question 2

Answer 3 -  B

Back to question 3

Answer 4 - A

Back to question 4

Answer 5 - C

Back to question 5

Answer 6 - B

Back to question 6

Answer 7 - A

Back to question 7

Answer 8 - C

Back to question 8

Answer 9 - A

Back to question 9

Answer 10 - D

Back to question 10

Answer 11 - B

Back to question 11

Answer 12 - D

Back to question 12

Answer 13 - C

Back to question 13

Answer 14 - C

Back to question 14

Answer 15 - B

Back to question 15

Answer 16 - D

Back to question 16

Answer 17 - C

Back to question 17

Answer 18 - B

Back to question 18

Answer 19 - C

Back to question 19

Answer 20 - B

Back to question 20

Copyright © 2000 to 2011 Genesis InSoft Limited. All Rights Reserved.