Which statement is not correct about the “init” process in Unix?
It is the first process in the system.
It has PID 1.
It is generally the parent of the login shell.
Init forks and execs a ‘getty’ process at every port connected to a terminal.
64 practice sets · Page 1 of 4
Which statement is not correct about the “init” process in Unix?
It is the first process in the system.
It has PID 1.
It is generally the parent of the login shell.
Init forks and execs a ‘getty’ process at every port connected to a terminal.
Unix command to change the case of first three lines of file “shortlist” from lower to upper
$ tr shortlist head -3 '[a-z]' '[A-Z]'
$ head -3 shortlist | tr '[a-z]' '[A-Z]'
$ tr head -3 shortlist '[A-Z]' '[a-z]'
$ tr '[a-z]' '[A-Z]' shortlist | head -3
Match the following vi commands in Unix:
| List-I | List-II |
|---|---|
| (a) :w | (i) Saves the file and quits editing mode |
| (b) :x | (ii) Quits without saving |
| (c) :q | (iii) Saves the file |
| (d) :q! | (iv) Quits the editor |
(a)-(iii), (b)-(i), (c)-(iv), (d)-(ii)
(a)-(iv), (b)-(iii), (c)-(ii), (d)-(i)
(a)-(ii), (b)-(iii), (c)-(i), (d)-(iv)
(a)-(iii), (b)-(iv), (c)-(i), (d)-(ii)
The Unix Operating System Kernel maintains two key data structures related to processes: the process table and the user structure. Consider the following statements:
Statement I: The process table is resident all the time and contains information needed for all processes, even those that are not currently in memory.
Statement 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 statements given above is/are correct?
Both Statement I and Statement II are correct
Both Statement I and Statement II are incorrect
Only Statement I is correct
Only Statement II is correct
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.”
ls -l | grep "June" | sort +10r
ls -l | grep -n "June" | sort +10x
ls -l | grep -v "June" | sort +10n
ls -l | grep "June" | sort +10n
Consider the following statements regarding the 'nice' command of UNIX:
Statement I: It is used to set or change the priority of a process.
Statement II: A process's nice value can be set at the time of creation.
Statement III: Only the superuser can specify a negative nice value to increase process priority.
Which of the statements given above is/are correct?
Statement II and Statement III only
Statement I and Statement III only
Statement I and Statement II only
Statement I, Statement II, and Statement III
In UNIX, processes that have finished execution but have not yet had their status collected are known as ________.
Zombie Processes
Stopped Processes
Sleeping processes
Orphan Processes
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?
Both Heap and Stack
Stack
Heap
Shared memory segments
Which of the following information about the UNIX file system is not correct?
Each i-node is 256-bytes long
All the files and directories are stored in data blocks
An i-node contains accounting information as well as enough information to locate all the disk blocks that holds the file’s data.
Super block contains the number of i-nodes, the number of disk blocks, and the start of the list of free disk blocks.
Which of the following option with reference to UNIX operating system is not correct?
QUIT is similar to TERM, except that it defaults to producing a core dump if not caught.
KILL is a blockable signal.
INT signal is sent by the terminal driver when one types < Control-C > and it is a request to terminate the current operation.
TERM is a request to terminate execution completely. The receiving process will clean up its state and exit.
What is the function of following UNIX command?
wc -l < a > b &
It runs the word count program to count the number of lines in its input, a, writing the result to b, as a foreground process.
It runs the word count program to count the number of lines in its input, a, writing the result to b, but does it in the background.
It counts the errors during the execution of a process, a, and puts the result in process b.
It copies the ‘ l ’ numbers of lines of program from file, a, and stores in file b.
Which of the following statement is not correct with reference to cron daemon in UNIX O.S?
Cron reads configuration files that contain list of command lines and the times at which they invoked.
The cron daemon is the standard tool for running commands on a pre-determined schedule.
It starts when the system boots and runs as long as the system is up.
Crontab files for individual users are not stored.
In Unix, files can be protected by assigning each one a 9-bit mode called rights bits. Consider the following statements:
Statement I: A mode of 641 (octal) means that the owner can read and write the file, other members of the owner's group can read it, and users can execute only.
Statement II: A mode of 100 (octal) allows the owner to execute the file, but prohibits all other access.
Which of the statements given above is/are correct?
Only Statement I is correct
Both Statement I and Statement II are incorrect
Only Statement II is correct
Both Statement I and Statement II are correct
In Unix, the login prompt can be changed by changing the contents of the file ________.
contrab
inittab
init
gettydefs
A unix file system has 1-KB blocks and 4-byte disk addresses. What is the maximum file size if i-nodes contain 10 direct entries and one single, double and triple indirect entry each?
64 GB
1 GB
32 GB
16 GB
In Unix operating system, special files are used to:
store information entered by a user application program or utility program
provide a mechanism to map physical device to file names
buffer data received in its input from where a process reads
store list of file names plus pointers associated with i-nodes
Match the following in Unix file system:
| List - I | List - II |
|---|---|
| (a) Boot block | (i) Information about file system |
| (b) Super block | (ii) Actual file data |
| (c) Inode block | (iii) File metadata and attributes |
| (d) Data block | (iv) OS loading program |
(a)-(iv), (b)-(i), (c)-(iii), (d)-(ii)
(a)-(iv), (b)-(ii), (c)-(i), (d)-(iii)
(a)-(i), (b)-(iii), (c)-(ii), (d)-(iv)
(a)-(iii), (b)-(i), (c)-(ii), (d)-(iv)
In Unix, the command to enable execution permission for file "mylife" by all is ________.
chmod ugo+x myfile
chmod a+x myfile
chmod +x myfile
All of the above
What will be the output of the following Unix command?
$ rm chap0[1 - 3]
Remove file chap[1 - 3]
Remove file chap01, chap02, chap03
Remove file chap0[1 - 3]
None of the above
Which of the following commands will output "onetwothree"?
for val; do echo -n $val; done < one two three
for one two three; do echo -n -; done
for n in one two three; do echo -n $n; done
for n in one two three {echo -n $n}