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
Which of the following octal permission values grants the specified permissions?
- User: Read, Write, and Execute
- Group: Read-only
- Others: Read-only
- User: Read, Write, and Execute
- Group: Read-only
- Others: Read-only
Solution
You open a terminal session inside a directory
. Executing an 
command lists the following files:

You execute the following shell command involving a single-character wildcard glob (?) and what all files will be listed in the output?

command lists the following files:
You execute the following shell command involving a single-character wildcard glob (?) and what all files will be listed in the output?
Solution
Consider the following project directory layout containing regular files and subdirectories, some of
which are empty:

Which find command specifically targets and lists only zero-byte regular files, while explicitly ignoring empty directories?
which are empty:
Which find command specifically targets and lists only zero-byte regular files, while explicitly ignoring empty directories?
Solution
During an interactive Bash shell session, a user executes several commands over a few hours. By default, Bash stores executed commands in an in-memory buffer during the active session. When the user exits the terminal session gracefully (e.g., executing
or closing the shell), Bash appends these buffered commands to a hidden history file located in the user's home directory.
Which standard environment file is automatically updated by Bash upon terminal exit to store these previously executed commands?
Which standard environment file is automatically updated by Bash upon terminal exit to store these previously executed commands?
Solution
As a system administrator logging into an unprivileged user session, you need to audit scheduled automated tasks without editing or modifying the system configuration files. You run a command to list the active crontab contents for your current user.

Which command was executed to print the scheduled cron jobs to the stdout shown above without opening an interactive editor?
Which command was executed to print the scheduled cron jobs to the stdout shown above without opening an interactive editor?
Solution
Match the AWK functions with their purposes.

Solution
Suppose
shows:

What will
commit?
What will
Solution
A user customizes the Bash prompt using:

The user is logged in as "alice" on host "server1", and the current directory is "/home/alice".
What will the prompt display?
The user is logged in as "alice" on host "server1", and the current directory is "/home/alice".
What will the prompt display?
Solution
Match the following RAID levels with their corresponding characteristics.

Which of the following is the correct matching?
Which of the following is the correct matching?
Solution
A developer runs a multi-stage pipeline to analyze their most frequently used shell commands:

Sample output generated by the pipeline:

Which specific component of this pipeline is explicitly responsible for parsing each line of the raw history output stream and isolating only the command name?
Sample output generated by the pipeline:
Which specific component of this pipeline is explicitly responsible for parsing each line of the raw history output stream and isolating only the command name?
Solution
Consider a file named
containing pairs of lowercase words separated by a space:

You want to use Basic Regular Expression (BRE) with grep to match only those lines where the second word is exactly the same as the first word.
Which command correctly performs this pattern matching?
You want to use Basic Regular Expression (BRE) with grep to match only those lines where the second word is exactly the same as the first word.
Which command correctly performs this pattern matching?
Solution
Consider the following Bash script:

The script is executed as:

What will be the output?
The script is executed as:
What will be the output?
Solution
What does the expression below mean?

Solution
What is the output of the following command?

Solution
Which of the following AWK commands will give the same output as the command above?
Note that
Solution
Consider the following
command:

The file
contains:

What will be the output of the above
command? (The order of
iteration over an awk array is not guaranteed by the language; consider the output correct regardless of line order.)
The file
What will be the output of the above
Solution
A log file contains timestamps in 24-hour format and you want to use
to match only valid 24-hour times in the format HH:MM, where HH is 00-23 and MM is 00-59.
Which of the following patterns correctly match only valid times?
Which of the following patterns correctly match only valid times?
Solution
Which of the following
commands will display lines 4 and 5 of
?
Assume that
contains at least 5 lines.
Assume that
Solution
Which of the following commands will display lines 10 through 20 (inclusive) of the file
?
Solution
A Bash user sets the PATH variable to an empty string using PATH="". What happens when the command "ls" is executed?
Solution
Which of the following statements about shell variables are correct?
Solution
Which command displays block devices?
Solution
Inscript
Consider the following shell script:

What will be the output?
Consider the following shell script:
What will be the output?
Solution
Shape
Thickness [ / ]
3
All colors