Unix Operating System

Comprehensive quiz covering Unix commands, vi editor, shell programming, system calls, process management, and file operations

25 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which command is used to compare two files and suggest changes to make them identical?

  1. comm
  2. diff
  3. cmp
  4. dircmp
Question 2 Multiple Choice (Single Answer)

What will happen if we execute 3yy command in vi editor?

  1. Entire line will be deleted.
  2. Three lines will be copied
  3. copy three lines
  4. None of above
Question 3 Multiple Choice (Single Answer)

Which of the following commands is not an environment variable in unix?

  1. $TZ
  2. $DISPLAY
  3. $PWD
  4. %PATH%
Question 4 Multiple Choice (Single Answer)

Which of the following is an invalid functioning of set command?

  1. Display a list of directories of shell searches.
  2. Specifies how the prompt is displayed in the bourne shell.
  3. Place values into the positional parameters.
  4. All of the above
Question 5 Multiple Choice (Single Answer)

Which of the following is not a command separator?

  1. #(hash operator)
  2. ;(semicolon)
  3. , (comma operator)
  4. / (division arithmetic operator)
Question 6 Multiple Choice (Single Answer)

Which command is used to delete single character in a command mode of vi editor?

  1. x
  2. $d
  3. ndd
  4. dd
Question 7 Multiple Choice (Single Answer)

Which command is not used to take backup of files?

  1. cp
  2. cpio
  3. tar
  4. dump
Question 8 Multiple Choice (Single Answer)

What is the ouput while executing wc -l command?

  1. print the line count
  2. print the byte count
  3. print the character count
  4. print the length of the longest line
Question 9 Multiple Choice (Single Answer)

Which of the following system calls used in phase while creating a process?

  1. fork
  2. exec
  3. wait
  4. all of the above
Question 10 Multiple Choice (Single Answer)

Which command is used for concatenate atleast two files vertically?

  1. paste
  2. join
  3. cat
  4. none of these
Question 11 Multiple Choice (Single Answer)

Which command is used to schedule jobs?

  1. ruptime
  2. df
  3. crontab
  4. none of these
Question 12 Multiple Choice (Single Answer)

Which of the following features of UNIX may be used for inter process communication?

  1. signals
  2. pipes
  3. semaphore
  4. all of the above
Question 13 Multiple Choice (Single Answer)

To simulate the command system, which of the system calls -fork, wait, and execl is/are to be used?

  1. fork and wait
  2. fork, wait, and execl
  3. fork and execl
  4. wait and execl
Question 14 Multiple Choice (Single Answer)

Which of the following are not system calls?

  1. chmod
  2. getc
  3. iseek
  4. open
Question 15 Multiple Choice (Single Answer)

Which of the following file names can be found in more than one directory?

  1. passwd
  2. bin
  3. both (1) and (2)
  4. none of these
Question 16 Multiple Choice (Single Answer)

Which of the following are not filter programs?

  1. date
  2. sort
  3. cat
  4. grep
Question 17 Multiple Choice (Single Answer)

Which of the following can be used to achieve redirection in pipes?

  1. >
  2. >>
  3. tee
  4. lpr
Question 18 Multiple Choice (Single Answer)

Which of the following programs is /are interactive?

  1. passwd
  2. date
  3. sh
  4. none of these
Question 19 Multiple Choice (Single Answer)

Which of the following library functions do/does not return a pointer to the structure FILE?

  1. fclose()
  2. frwrite()
  3. both (1) and (2)
  4. none of these
Question 20 Multiple Choice (Single Answer)

Which of the following functions can be used to randomly access a file?

  1. fgetc
  2. getc
  3. fseek
  4. all of the above
Question 21 Multiple Choice (Single Answer)

Which of the following processes has the PID 1?

  1. kernel
  2. UNIX
  3. init
  4. shell
Question 22 Multiple Choice (Single Answer)

Which of the following are implemented as macros (rather than functions)?

  1. fgetc
  2. getc
  3. getchar
  4. both (2) and (3)
Question 23 Multiple Choice (Single Answer)

Which of the following system calls does not return control to the calling point on termination?

  1. fork
  2. exec
  3. ioctl
  4. none of these
Question 24 Multiple Choice (Single Answer)

In which of the following directories does init reside?

  1. root
  2. bin
  3. etc
  4. usr
Question 25 Multiple Choice (Single Answer)

Which of the following is used to write disk block images from memory to disk?

  1. clri
  2. sync
  3. mkfs
  4. stty