21. Unix command to change the case of first three lines of file “shortlist” from lower to upper a. $tr ‘[a-z]’ ‘[A-Z]’ shortlist | head-3 b.$ head-3 shortlist | tr ‘[a-z]’ ‘[A-Z]’ c. $tr head-3 shortlist ‘[A-Z]’ ‘[a-z]’ d.$ tr shortlist head-3 ‘[a-z]’ ‘[A-Z]’

 22. Match the following vi commands in Unix:List-I                   List-IIa.   :w        i. saves the file and quits editing modeb.   :x         ii. escapes unix shellc.   :q         iii. saves file and remains in editing moded. :sh       iv. quits editing mode and no changes are saved to the fileCodes:     a   b  c  d a. ii   iii  i  iv b. iv  iii  ii  i c. iii  iv  i  ii d. iii  i   iv ii

 23. The Unix Operating System Kernel maintains two key data structures related to processes, the process table and the user structure. Now, consider the following two statements:I. The process table is resident all the time and contain information needed for all processes, even those that are not currently in memory.II. The user structure is swapped or paged out when its associated process is not in memory, in order not to waste memory on information that is not needed.Which of the following options is correct with reference to above statements ? a. Only (I) is correct b. Only (II) is correct c. Both (I) and (II) are correct d. Both (I) and (II) are wrong
 Answer: (c).Both (I) and (II) are correct

 24. Consider the following operations to be performed in Unix:“The pipe sorts all files in the current directory modified in the month of “June” by order of size and prints them to the terminal screen. The sort option skips ten fields then sorts the lines in numeric order.”Which of the following Unix command will perform above set of operations? a. ls – l | grep “June” | sort + 10n b. ls – l | grep “June” | sort + 10r c. ls – l | grep – v “June” | sort + 10n d. ls – l | grep – n “June” | sort + 10x
 Answer: (a).ls – l | grep “June” | sort + 10n

 25. Which of the following statement(s) is/are True regarding ‘nice’ command of UNIX?I. It is used to set or change the priority of a process.II. A process’s nice value can be set at the time of creation.III. ‘nice’ takes a command line as an argument. a. I, II only b. II, III only c. I, II, III d. I, III only

 26. In UNIX, processes that have finished execution but have not yet had their status collected are known as ................ a. Sleeping processes b. Stopped Processes c. Zombie Processes d. Orphan Processes

 27. In UNIX operating system, when a process creates a new process using the fork() system call, which of the following state is shared between the parent process and child process? a. Heap b. Stack c. Shared memory segments d. Both Heap and Stack