Unix Operating System
Comprehensive quiz covering Unix commands, vi editor, shell programming, system calls, process management, and file operations
Questions
Which command is used to compare two files and suggest changes to make them identical?
- comm
- diff
- cmp
- dircmp
What will happen if we execute 3yy command in vi editor?
- Entire line will be deleted.
- Three lines will be copied
- copy three lines
- None of above
Which of the following commands is not an environment variable in unix?
- $TZ
- $DISPLAY
- $PWD
- %PATH%
Which of the following is an invalid functioning of set command?
- Display a list of directories of shell searches.
- Specifies how the prompt is displayed in the bourne shell.
- Place values into the positional parameters.
- All of the above
Which of the following is not a command separator?
- #(hash operator)
- ;(semicolon)
- , (comma operator)
- / (division arithmetic operator)
Which command is used to delete single character in a command mode of vi editor?
- x
- $d
- ndd
- dd
Which command is not used to take backup of files?
- cp
- cpio
- tar
- dump
What is the ouput while executing wc -l command?
- print the line count
- print the byte count
- print the character count
- print the length of the longest line
Which of the following system calls used in phase while creating a process?
- fork
- exec
- wait
- all of the above
Which command is used for concatenate atleast two files vertically?
- paste
- join
- cat
- none of these
Which command is used to schedule jobs?
- ruptime
- df
- crontab
- none of these
Which of the following features of UNIX may be used for inter process communication?
- signals
- pipes
- semaphore
- all of the above
To simulate the command system, which of the system calls -fork, wait, and execl is/are to be used?
- fork and wait
- fork, wait, and execl
- fork and execl
- wait and execl
Which of the following are not system calls?
- chmod
- getc
- iseek
- open
Which of the following file names can be found in more than one directory?
- passwd
- bin
- both (1) and (2)
- none of these
Which of the following are not filter programs?
- date
- sort
- cat
- grep
Which of the following can be used to achieve redirection in pipes?
- >
- >>
- tee
- lpr
Which of the following programs is /are interactive?
- passwd
- date
- sh
- none of these
Which of the following library functions do/does not return a pointer to the structure FILE?
- fclose()
- frwrite()
- both (1) and (2)
- none of these
Which of the following functions can be used to randomly access a file?
- fgetc
- getc
- fseek
- all of the above
Which of the following processes has the PID 1?
- kernel
- UNIX
- init
- shell
Which of the following are implemented as macros (rather than functions)?
- fgetc
- getc
- getchar
- both (2) and (3)
Which of the following system calls does not return control to the calling point on termination?
- fork
- exec
- ioctl
- none of these
In which of the following directories does init reside?
- root
- bin
- etc
- usr
Which of the following is used to write disk block images from memory to disk?
- clri
- sync
- mkfs
- stty