Question 1 | MCQ
THIS IS QUESTION PAPER FOR THE SUBJECT "DIPLOMA LEVEL : SYSTEM COMMANDS
(COMPUTER BASED EXAM)"
ARE YOU SURE YOU HAVE TO WRITE EXAM FOR THIS SUBJECT?
CROSS CHECK YOUR HALL TICKET TO CONFIRM THE SUBJECTS TO BE WRITTEN.
(IF IT IS NOT THE CORRECT SUBJECT, PLS CHECK THE SECTION AT THE TOP FOR THE SUBJECTS REGISTERED BY YOU)
(COMPUTER BASED EXAM)"
ARE YOU SURE YOU HAVE TO WRITE EXAM FOR THIS SUBJECT?
CROSS CHECK YOUR HALL TICKET TO CONFIRM THE SUBJECTS TO BE WRITTEN.
(IF IT IS NOT THE CORRECT SUBJECT, PLS CHECK THE SECTION AT THE TOP FOR THE SUBJECTS REGISTERED BY YOU)
Solution
Inscript
A Linux-like file system uses index nodes (inodes) to manage files. A newly formatted volume has 10,000 free inodes. A user performs the following sequential actions:
1. A directory named
is created.
2. Inside
, a script creates a single large data file named
.
3. The script then successfully creates
hard links to
within the same directory, each with a unique name.
4. Finally, the script successfully creates
symbolic (soft) links, each pointing to
.
Assume each symbolic link occupies its own inode and hard links do not allocate new inodes.
Assuming no other processes are writing to the volume, what is the total number of free inodes remaining on the volume after these actions are completed?
A Linux-like file system uses index nodes (inodes) to manage files. A newly formatted volume has 10,000 free inodes. A user performs the following sequential actions:
1. A directory named
2. Inside
3. The script then successfully creates
4. Finally, the script successfully creates
Assume each symbolic link occupies its own inode and hard links do not allocate new inodes.
Assuming no other processes are writing to the volume, what is the total number of free inodes remaining on the volume after these actions are completed?
Solution
A system administrator is configuring a shared project directory. The requirements for three specific system objects are defined as follows:
1.
: The owner can only read and write to it. Members of the group can only read it. Everyone else has no access.
2.
: Anyone on the system can read and execute it, but only the owner can modify it.
3.
: It is a directory. The owner and group members have read, write, and execute permissions on it. External users ("others") have execute permission only, allowing them to access known files without listing the directory contents.
Which of the following lines matches the correct
output for these objects?
1.
2.
3.
Which of the following lines matches the correct
Solution
A file named
contains the following four raw text lines:

An administrator uses different variations of regular expressions to extract specific log entries.
Which of the following statements is/are TRUE regarding the execution and matching behavior of these commands?
An administrator uses different variations of regular expressions to extract specific log entries.
Which of the following statements is/are TRUE regarding the execution and matching behavior of these commands?
Solution
You have created a file named
that contains the following filenames:

You want to extract only the lines that contain
and
(but not 
or
).
Which of the following grep commands will correctly achieve this?
You want to extract only the lines that contain
or
Which of the following grep commands will correctly achieve this?
Solution
A system directory contains the following list of files:
-
-
-
-
-
An administrator wants to process a specific subset of these files using the following command:

Which of the following statements correctly describes which files are matched by this command and why?
-
-
-
-
-
An administrator wants to process a specific subset of these files using the following command:
Which of the following statements correctly describes which files are matched by this command and why?
Solution
A DevOps engineer is configuring secure, passwordless SSH access from a local administration workstation to a remote Linux cloud server. Which of the following operations is correctly described regarding the placement and management of the keys?
Solution
Match the following Vi/Vim and Emacs commands to their correct functionality.
Vi / Vim Commands

Emacs Commands
Note: Here,
means the
key and
means the
(Meta) key.

Which of the following option combinations is correct?
Vi / Vim Commands
Emacs Commands
Note: Here,
Which of the following option combinations is correct?
Solution
A system administrator writes a maintenance script named
. They attempt to run the script with the following redirection setup in the terminal:

What is the operational outcome of executing this specific command?
What is the operational outcome of executing this specific command?
Solution
You want to perform an automated network diagnostics sequence with the following constraints:
1. Run a primary connection test script
.
2. If and only if it fails, run an intensive route tracing script
.
3. From the output of
, extract only the lines containing the word
.
4. Save those filtered lines to a file named
.
Which command combination is correct?
1. Run a primary connection test script
2. If and only if it fails, run an intensive route tracing script
3. From the output of
4. Save those filtered lines to a file named
Which command combination is correct?
Solution
Which of the following commands will print lines 8 to 15 (inclusive) from the top of a file named
?
Solution
The above command is used to
Solution
An operator attempts to run a critical update sequence on a production server using the following two independent commands:
- Command 1:
- Command 2:
After running both commands, the engineer notices that
did not execute, but
did execute.
Based on the short-circuit behavior of shell operators, what can be definitively concluded about the exit statuses of the initial scripts (
and
)?
- Command 1:
- Command 2:
After running both commands, the engineer notices that
Based on the short-circuit behavior of shell operators, what can be definitively concluded about the exit statuses of the initial scripts (
Solution
File: 
Note: Answer this question only based on the file contents given below.
Contents:

You want to find all lines that start exactly with
(lowercase only) and end with a 4- digit port number that specifically begins with
(i.e., ports in the range
to
).
Which of the following commands will correctly print all and only the required lines?
Note: Answer this question only based on the file contents given below.
You want to find all lines that start exactly with
Which of the following commands will correctly print all and only the required lines?
Solution
Consider the following standard IPv4 address class ranges:
- Class A:
- Class B:
- Class C:
- Loopback:
A file named
contains a list of various IP addresses. You want to extract only the lines containing Class B IP addresses based strictly on their first octet value (ranging from 128 to 191).
Which of the following commands will correctly filter and print these lines?
- Class A:
- Class B:
- Class C:
- Loopback:
A file named
Which of the following commands will correctly filter and print these lines?
Solution
Comprehension Passage
Assume you are in your home directory
, and the current directory structure is:

You always start executing each question from the base directory
.
Note: Both questions are to be answered independently, based solely on the directory structure provided above.
Based on the above data, answer the given subquestions.
You always start executing each question from the base directory
Note: Both questions are to be answered independently, based solely on the directory structure provided above.
Based on the above data, answer the given subquestions.
You want to perform the following operations:
1. Create a new nested directory path named
directly inside
.
2. Create an empty file named
inside that new
directory.
3. Inside the
directory, create nine new empty test files named
,
, ... up to
.
Which of the following command sets will perform all the above operations correctly?
1. Create a new nested directory path named
2. Create an empty file named
3. Inside the
Which of the following command sets will perform all the above operations correctly?
Solution
Comprehension Passage
Assume you are in your home directory
, and the current directory structure is:

You always start executing each question from the base directory
.
Note: Both questions are to be answered independently, based solely on the directory structure provided above.
Based on the above data, answer the given subquestions.
You always start executing each question from the base directory
Note: Both questions are to be answered independently, based solely on the directory structure provided above.
Based on the above data, answer the given subquestions.
An engineer executes the following command sequence in their terminal, starting from
:

Which of the following statements correctly describes the final outcome and system state after these commands are run?
Which of the following statements correctly describes the final outcome and system state after these commands are run?
Solution
Shape
Thickness [ / ]
3
All colors