Practice high-yield Computer Science & IT MCQs on Unix — Part 2 with worked academic solutions for PPSC, FPSC, CSS, PMS, NTS.
Questions
40
Difficulty Level
Exam-Level
Target Exams
PPSC, FPSC, CSS...
Estimated Time
48 mins
Exam-Level PPSC FPSC CSS PMS NTS
Verified for Commission Syllabus • Oct 14, 2026
40
Verified Practice Questions
Interactive test mode with detailed academic worked solutions
Live Progress|0/40 answered
✓0 correct
✗0 wrong
0% score
🎉 Set complete! All 40 questions answered.
Question 1 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
The second set of the three permissions (r-) indicates that
Correct Answer: Option B — other has read permission only
Detailed Academic Explanation:
In Unix file permissions, the three sets of permissions (rwx) represent the access rights for the owner, group, and others, respectively. The second set of permissions, indicated by (r-), means that the group associated with the file or directory has read permission only. The absence of the "w" (write) and "x" (execute) permissions indicates that the group does not have those permissions. So, Option B is the correct interpretation of the second set of permissions (r-) in Unix file permissions.
💡Key Conceptual Anchor:Unix
Question 2 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which column contains all details of the permissions of a file when you issue the ls -l command?
Correct Answer: Option D — first
Detailed Academic Explanation:
When you issue the ls -l command in Unix, the output displays detailed information about files and directories in the current directory. The first column in the output represents the permissions of the file or directory. This column provides information about read, write, and execute permissions for the owner, group, and others, respectively. So, Option D is the column that contains all details of the permissions of a file when you issue the ls -l command.
💡Key Conceptual Anchor:Unix
Question 3 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of the following commands is used to display your working directory?
Correct Answer: Option C — pwd
Detailed Academic Explanation:
In Unix, the pwd command stands for "print working directory". When you issue this command, it displays the full pathname of the current working directory. This helps users to know which directory they are currently working in within the Unix filesystem. So, Option C is the command used to display your working directory in Unix.
💡Key Conceptual Anchor:Unix
Question 4 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
While working with mail command, which command is used to save mail in a separate file?
Correct Answer: Option C — w
Detailed Academic Explanation:
In Unix, when using the mail command to read or compose emails, the w command is used to save the mail in a separate file. After composing or reading an email, if you want to save it to a file, you can use the w command followed by the filename. This command writes the email content to the specified file. So, Option C is the command used to save mail in a separate file while working with the mail command in Unix.
💡Key Conceptual Anchor:Unix
Question 5 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
The command used to compare the files is known as
Correct Answer: Option B — cmp
Detailed Academic Explanation:
In Unix, the cmp command is used to compare two files byte by byte and determine whether their contents are identical or not. When you execute this command followed by the names of two files, it compares the files and provides information about the first byte where they differ, if any. So, Option B is the command used to compare files in Unix.
💡Key Conceptual Anchor:Unix
Question 6 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which command is used to terminate a process?
Correct Answer: Option D — kill
Detailed Academic Explanation:
In Unix, the kill command is used to terminate or send signals to processes. By default, it sends the TERM signal to a process, which instructs it to gracefully terminate. However, you can specify different signals using various options of the kill command. For instance, using kill -9 sends the KILL signal, which immediately terminates the process without allowing it to clean up. So, Option D is the command used to terminate a process in Unix.
💡Key Conceptual Anchor:Unix
Question 7 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which option will be used with sort command to start sorting ofter the nth column of the (m+l)th field?
Correct Answer: Option B — +m.n
Detailed Academic Explanation:
In the Unix sort command, the -k option is used to specify the key fields to be used for sorting. It allows you to define a custom sort field based on column position. The syntax for using this option is -k start[,end], where start and end are the positions of the starting and ending columns of the key field, respectively. The +m.n option specifies sorting starting after the nth column of the mth field. Therefore, Option B is the correct choice.
💡Key Conceptual Anchor:Unix
Question 8 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
The cp command uses:
Correct Answer: Option D — neither standard input nor standard output file
Detailed Academic Explanation:
The cp command in Unix is used to copy files and directories from a source to a destination. It does not involve standard input or standard output files. Instead, it directly works with file system paths as source and destination arguments. Therefore, Option D is the correct choice.
💡Key Conceptual Anchor:Unix
Question 9 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of the following files contains information related to password aging?
Correct Answer: Option A — Shadow
Detailed Academic Explanation:
In Unix-like operating systems, including Linux, the /etc/shadow file stores encrypted password and other security-related information such as password aging policies for user accounts. It is readable only by the root user and provides enhanced security compared to the older /etc/passwd file. Therefore, Option A is the correct choice.
💡Key Conceptual Anchor:Unix
Question 10 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of the following is not a filter?
Correct Answer: Option A — cat
Detailed Academic Explanation:
Option A: cat This option is correct. The cat (concatenate) command in Unix is used to read and concatenate files and print them to the standard output. It does not filter data but rather displays the contents of files or concatenates them. Therefore, it is not considered a filter. Option B: grep This option is incorrect. The grep command is a filter that searches for patterns within text. It reads input and outputs only the lines that match the given pattern. Option C: wc This option is incorrect. The wc (word count) command is a filter that counts the number of lines, words, and characters in a file or input stream. It processes the input data and produces summarized output, making it a filter. Option D: sort This option is incorrect. The sort command is a filter that sorts the lines of input data based on specified criteria. It reads input data, processes it, and outputs the sorted result, thus acting as a filter. Option E: None of the above This option is incorrect. As explained above, the cat command is not a filter, while the other commands listed are filters. Conclusion: The cat command is not a filter, making Option A: cat the correct answer.
💡Key Conceptual Anchor:Unix
Question 11 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which set option is used with vi editor to display line numbers on screen?
Correct Answer: Option B — nu
Detailed Academic Explanation:
In the vi editor, the set option "nu" is used to display line numbers on the screen. When you type ":set nu" or ":set number" in command mode of vi, it enables line numbering, displaying line numbers to the left of each line. Therefore, the correct answer is Option B: nu .
💡Key Conceptual Anchor:Unix
Question 12 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which option will be used with disk free command to include the total amount of disk space in the file system?
Correct Answer: Option B — -a
Detailed Academic Explanation:
The -a option is used with the disk free command ( df ) to include the total amount of disk space in the file system. This option displays all filesystems, including those with a size of zero blocks.
💡Key Conceptual Anchor:Unix
Question 13 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of the following command is used to go to home directory?
Correct Answer: Option C — cd
Detailed Academic Explanation:
The cd command is used to change the current working directory. When used without any arguments, it takes you to your home directory. Options A, B, and D are incorrect as they do not accurately represent the command to go to the home directory.
💡Key Conceptual Anchor:Unix
Question 14 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which command is used to move all files to the bin sub-directory of the parent directory?
Correct Answer: Option C — mv * ../bin
Detailed Academic Explanation:
The mv command is used to move files or directories. In this case, the wildcard * is used to select all files in the current directory, and ../bin specifies the bin sub-directory of the parent directory as the destination. Options A, B, and D are incorrect as they either specify incorrect destination directories or use incorrect wildcard patterns.
💡Key Conceptual Anchor:Unix
Question 15 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Major expressions used with find command to select file is it has been accessed in more than 375 days, is
Correct Answer: Option A — -atime +375
Detailed Academic Explanation:
The -atime option with +375 is used with the find command to select files that have been accessed more than 375 days ago. This option looks at the access time of the file. Options B, C, and D are incorrect as they refer to modification time ( -mtime ), change time ( -ctime ), and specifying a newer modification time respectively, which are not suitable for selecting files based on access time.
💡Key Conceptual Anchor:Unix
Question 16 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which command will be used with vi editor to replace text from cursor to right?
Correct Answer: Option B — s
Detailed Academic Explanation:
s is the correct answer to “Which command will be used with vi editor to replace text from cursor to right”. This question is standard in competitive examination syllabi for Unix.
💡Key Conceptual Anchor:Unix
Question 17 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of the following commands is used to rename a file?
Correct Answer: Option C — mv
Detailed Academic Explanation:
mv is the correct answer to “Which of the following commands is used to rename a file”. This question is standard in competitive examination syllabi for Unix.
💡Key Conceptual Anchor:Unix
Question 18 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of the following commands is used to copy a file wb from the programs directory into a file called wbx in the misc directory?
Correct Answer: Option B — cp programs/wb misc/wbx
Detailed Academic Explanation:
cp programs/wb misc/wbx is the correct answer to “Which of the following commands is used to copy a file wb from the programs directory into a file called wbx in the misc directory”. This question is standard in competitive examination syllabi for Unix.
💡Key Conceptual Anchor:Unix
Question 19 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which command is used to list all the files with extension .lst?
Correct Answer: Option A — ls -l *.lst
Detailed Academic Explanation:
ls -l *.lst is the correct answer to “Which command is used to list all the files with extension .lst”. This question is standard in competitive examination syllabi for Unix.
💡Key Conceptual Anchor:Unix
Question 20 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which option is used with the chmod command recursively to all files and sub-directories in a directory?
Correct Answer: Option D — None of the above
Detailed Academic Explanation:
None of the above is the correct answer to “Which option is used with the chmod command recursively to all files and sub-directories in a directory”. This question is standard in competitive examination syllabi for Unix.
💡Key Conceptual Anchor:Unix
Question 21 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which command is used to change directory to the name beginning with a 'p'?
Correct Answer: Option C — cd p*
Detailed Academic Explanation:
cd p* is the correct answer to “Which command is used to change directory to the name beginning with a 'p'”. This question is standard in competitive examination syllabi for Unix.
💡Key Conceptual Anchor:Unix
Question 22 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of the following is invalid filename?
Correct Answer: Option E — None of the above
Detailed Academic Explanation:
None of the above is the correct answer to “Which of the following is invalid filename”. This question is standard in competitive examination syllabi for Unix.
💡Key Conceptual Anchor:Unix
Question 23 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which commands is used to assign executable permission to all of the files named "letter"?
Correct Answer: Option D — chmod ugo+x letter
Detailed Academic Explanation:
chmod ugo+x letter is the correct answer to “Which commands is used to assign executable permission to all of the files named "letter"”. This question is standard in competitive examination syllabi for Unix.
💡Key Conceptual Anchor:Unix
Question 24 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which command is used to print a file?
Correct Answer: Option D — lp
Detailed Academic Explanation:
lp is the correct answer to “Which command is used to print a file”. This question is standard in competitive examination syllabi for Unix.
💡Key Conceptual Anchor:Unix
Question 25 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which command will be used with vi editor to replace single character under cursor with any number of characters?
Correct Answer: Option A — s
Detailed Academic Explanation:
s is the correct answer to “Which command will be used with vi editor to replace single character under cursor with any number of characters”. This question is standard in competitive examination syllabi for Unix.
💡Key Conceptual Anchor:Unix
Question 26 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of the following set options is used with vi editor to ignore case while searching for patterns?
Correct Answer: Option A — ic
Detailed Academic Explanation:
ic is the correct answer to “Which of the following set options is used with vi editor to ignore case while searching for patterns”. This question is standard in competitive examination syllabi for Unix.
💡Key Conceptual Anchor:Unix
Question 27 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which command is used to list out all the hidden files along with the other files?
Correct Answer: Option D — ls -a
Detailed Academic Explanation:
ls -a is the correct answer to “Which command is used to list out all the hidden files along with the other files”. This question is standard in competitive examination syllabi for Unix.
💡Key Conceptual Anchor:Unix
Question 28 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of the following commands is used to absolutely assign all permissions to the owner, read and write permissions to the group and only executable permission to the others of the file note?
Correct Answer: Option A — chmod 761 note
Detailed Academic Explanation:
chmod 761 note is the correct answer to “Which of the following commands is used to absolutely assign all permissions to the owner, read and write permissions to the group and only executable permission to the others of the file note”. This question is standard in competitive examination syllabi for Unix.
💡Key Conceptual Anchor:Unix
Question 29 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
The chmod ugo+rw note command can be represented in octal notation as
Correct Answer: Option B — chmod 666 note
Detailed Academic Explanation:
chmod 666 note is the correct answer to “The chmod ugo+rw note command can be represented in octal notation as”. This question is standard in competitive examination syllabi for Unix.
💡Key Conceptual Anchor:Unix
Question 30 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of the following commands is used to display the filenames in multiple columns with indication of directories and executable file?
Correct Answer: Option A — ls -F -x
Detailed Academic Explanation:
ls -F -x is the correct answer to “Which of the following commands is used to display the filenames in multiple columns with indication of directories and executable file”. This question is standard in competitive examination syllabi for Unix.
💡Key Conceptual Anchor:Unix
Question 31 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which command is used with vi editor to search a pattern in the forward direction?
Correct Answer: Option A — /
Detailed Academic Explanation:
/ is the correct answer to “Which command is used with vi editor to search a pattern in the forward direction”. This question is standard in competitive examination syllabi for Unix.
💡Key Conceptual Anchor:Unix
Question 32 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of the following commands is used to assign executable permission to the owner of the file named "note"?
Correct Answer: Option C — chmod u+x note
Detailed Academic Explanation:
chmod u+x note is the correct answer to “Which of the following commands is used to assign executable permission to the owner of the file named "note"”. This question is standard in competitive examination syllabi for Unix.
💡Key Conceptual Anchor:Unix
Question 33 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
The command to count the number of files in the current directory by using pipes, is
Correct Answer: Option C — ls | wc -w
Detailed Academic Explanation:
ls | wc -w is the correct answer to “The command to count the number of files in the current directory by using pipes, is”. This question is standard in competitive examination syllabi for Unix.
💡Key Conceptual Anchor:Unix
Question 34 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of the following commands is used to get directory one level up?
Correct Answer: Option B — cd ..
Detailed Academic Explanation:
cd .. is the correct answer to “Which of the following commands is used to get directory one level up”. This question is standard in competitive examination syllabi for Unix.
💡Key Conceptual Anchor:Unix
Question 35 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of the following commands is used to count the total number of lines, words, and characters contained in a file.
Correct Answer: Option B — wc
Detailed Academic Explanation:
wc is the correct answer to “Which of the following commands is used to count the total number of lines, words, and characters contained in a file.”. This question is standard in competitive examination syllabi for Unix.
💡Key Conceptual Anchor:Unix
Question 36 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which command is used to delete all files in the current directory as well as all files and sub-directories in its subdirectories?
Correct Answer: Option B — rm -r *
Detailed Academic Explanation:
rm -r * is the correct answer to “Which command is used to delete all files in the current directory as well as all files and sub-directories in its subdirectories”. This question is standard in competitive examination syllabi for Unix.
💡Key Conceptual Anchor:Unix
Question 37 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of the following commands is used to change the working directory?
Correct Answer: Option A — cd
Detailed Academic Explanation:
cd is the correct answer to “Which of the following commands is used to change the working directory”. This question is standard in competitive examination syllabi for Unix.
💡Key Conceptual Anchor:Unix
Question 38 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which of the following commands is used to view your file 24 lines at a time?
Correct Answer: Option A — pg
Detailed Academic Explanation:
pg is the correct answer to “Which of the following commands is used to view your file 24 lines at a time”. This question is standard in competitive examination syllabi for Unix.
💡Key Conceptual Anchor:Unix
Question 39 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
Which shell's wild-cards is used to match a single character?
Correct Answer: Option B — ?
Detailed Academic Explanation:
? is the correct answer to “Which shell's wild-cards is used to match a single character”. This question is standard in competitive examination syllabi for Unix.
💡Key Conceptual Anchor:Unix
Question 40 of 40
★ PPSC
★ FPSC
★ PPSC
★ FPSC
In Bourne shell, which file sets the Unix environment for the user when the logs into his HOME directory.
Correct Answer: Option B — .profile
Detailed Academic Explanation:
.profile is the correct answer to “In Bourne shell, which file sets the Unix environment for the user when the logs into his HOME directory.”. This question is standard in competitive examination syllabi for Unix.
💡Key Conceptual Anchor:Unix
✓Link copied to clipboard
Continue Your Practice
Advanced Mapreduce Concepts — Part 1
Master the next curriculum module with 40 exam-standard MCQs.
In competitive commission exams (FPSC, PPSC, KPPSC, SPSC, CSS, PMS), questions are frequently phrased with distractor options designed to catch rote learners. Whenever you answer an MCQ, read the Detailed Academic Explanation and Conceptual Anchor to understand why the remaining options are incorrect.