ExamVeda
Login
Home
21
The agency that sits between the user and the UNIX system is called the
Discuss
Answer & Solution
Answer: Option C
Solution:
In Unix, the agency that sits between the user and the UNIX system is called the shell.
The shell is a command-line interpreter that takes commands from the user and executes them. It provides an interface for users to interact with the operating system, allowing them to run programs, manipulate files, and perform various tasks.
So, shell is the correct term for the agency that sits between the user and the UNIX system.
22
Which of the following commands is used to update access and modification times of a file?
Discuss
Answer & Solution
Answer: Option C
Solution:
In Unix, the touch command is used to update access and modification times of a file. If the file specified doesn't exist, touch creates an empty file with the specified name.
So, touch is the correct command to update access and modification times of a file.
23
Which command is used to count just the number of characters in a file?
Discuss
Answer & Solution
Answer: Option B
Solution:
In Unix, the wc command is used to count words, lines, and characters in a file. The -c option specifically instructs wc to count just the number of characters in the file.
So, wc -c is the correct command to count just the number of characters in a file.
24
Which of the following commands is used to list contents of directories?
Discuss
Answer & Solution
Answer: Option A
Solution:
In Unix, the ls command is used to list the contents of directories. It displays the names of files and directories in the specified directory.
So, ls is the correct command to list contents of directories.
25
Which command is used to display a file contents in octal form?
Discuss
Answer & Solution
Answer: Option B
Solution:
In Unix, the od command is used to display file contents in octal form. It stands for "octal dump".
So, od is the correct command to display a file's contents in octal form.
26
Which command will be used with vi editor to insert text to left of cursor?
Discuss
Answer & Solution
Answer: Option D
Solution:
In the vi editor, the i command is used to insert text before the cursor position. Conversely, the a command is used to insert text after the cursor position. Therefore, to insert text to the left of the cursor, you would use the i command.
So, i is the command used with the vi editor to insert text to the left of the cursor.
27
In vi editor, forward search is performed using the command.
Discuss
Answer & Solution
Answer: Option C
Solution:
In the vi editor, forward search is performed using the / command followed by the pattern you want to search for. This command allows you to search forward from the current cursor position for the specified pattern.
So, /pat is the command used in the vi editor for forward search.
28
Which of the following special shell variables is used to process number of the last background job?
Discuss
Answer & Solution
Answer: Option A
Solution:
In Unix shell scripting, the $! special variable is used to process the number of the last background job. It holds the process ID (PID) of the last command run in the background.
So, $! is the special shell variable used to process the number of the last background job.
29
Which option will be used with ps command to slow the entire command line of the process being run?
Discuss
Answer & Solution
Answer: Option E
Solution:
In Unix/Linux, the ps command is used to display information about active processes.

To show the entire command line of the process being run, the correct option is -f (full format) or -w (wide output), not the given options.

The commonly used options for displaying the full command line are:

ps -f → Displays full-format listing, including command-line arguments.

ps -ef → Shows all processes in full format.

ps aux → Provides detailed information about all running processes.

Since none of the given options (-4, -3, -1, -2) are correct, the correct answer is None of the above.
30
Which of the following command addresses all users who are currently hooked on?
Discuss
Answer & Solution
Answer: Option C
Solution:
In Unix, the wall command is used to send a message to all users who are currently logged in. It stands for "write all". This command sends a message to all terminals except those who have disabled messages using the mesg command.
So, wall is the command that addresses all users who are currently hooked on.