- Unix / Linux for Beginners
- Unix / Linux - Home
- Unix / Linux - What is Linux?
- Unix / Linux - Getting Started
- Unix / Linux - File Management
- Unix / Linux - Directories
- Unix / Linux - File Permission
- Unix / Linux - Environment
- Unix / Linux - Basic Utilities
- Unix / Linux - Pipes & Filters
- Unix / Linux - Processes
- Unix / Linux - Communication
- Unix / Linux - The vi Editor
- Unix / Linux Shell Programming
- Unix / Linux - Shell Scripting
- Unix / Linux - What is Shell?
- Unix / Linux - Using Variables
- Unix / Linux - Special Variables
- Unix / Linux - Using Arrays
- Unix / Linux - Basic Operators
- Unix / Linux - Decision Making
- Unix / Linux - Shell Loops
- Unix / Linux - Loop Control
- Unix / Linux - Shell Substitutions
- Unix / Linux - Quoting Mechanisms
- Unix / Linux - IO Redirections
- Unix / Linux - Shell Functions
- Unix / Linux - Manpage Help
- Advanced Unix / Linux
- Unix / Linux - Regular Expressions
- Unix / Linux - File System Basics
- Unix / Linux - User Administration
- Unix / Linux - System Performance
- Unix / Linux - System Logging
- Unix / Linux - Signals and Traps
Unix Mock Test
This section presents you various set of Mock Tests related to Unix Framework. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.
Unix Mock Test II
Answer : D
Explanation
The rest are communication commands.
Q 2 - Which is following key moves the cursor to the end of the line in vi editor?
Answer : B
Explanation
Answer : C
Explanation
rm, can delete a file as well as a directory.
Q 4 - Which character can be used to separate two commands on the same line?
Answer : B
Explanation
Q 5 - Command used to update access and modification times of a file.
Answer : B
Explanation
touch can even create an empty file apart from updating access and modification time.
Q 6 - Choose the correct option to replace all the occurrences of pattern1 with pattern2 using vi editor.
Answer : A
Explanation
‘g’ indicate to replace globally.
Q 7 - Which command can be used to start the process with the required priority?
Answer : C
Explanation
By default OS starts the process with normal priority which can be altered with the help of ‘nice’ command.
Q 8 - Which command can be used to drop a message to all logged in users.
Answer : D
Explanation
‘wall’ is considered as broadcasting command. Typically used by admins to pass on important info to all logged in users.
Q 9 - Which option can be used with ‘rm’ command to prompt for file removal?
Answer : B
Explanation
By default ‘rm’ is non interactive. –i means as interactive.
Answer : B
Explanation
–t is to sort by modification time.
Q 11 - Which command can be used to determine file type by its content?
Answer : A
Explanation
Command ‘file’ determines the file type by MIME.
Answer : C
Explanation
–d means as delimiter, acts as field separator.
Answer : A
Explanation
Q 14 - Following file contains the encrypted password of the users.
Answer : B
Explanation
Q 15 - Which command can be used to rename a file or a directory?
Answer : B
Explanation
‘mv’ can also be used to move files/directories from one directory to another.
Q 16 - Which option can be used with ‘chmod’ to apply permission bits recursively on all the files.
Answer : B
Explanation
Q 17 - Which is the invalid file name in UNIX?
Answer : D
Explanation
Q 18 - Which character is used to search a pattern in the forward direction in vi editor?
Answer : D
Explanation
Q 19 - Choose the correct usage of ‘cd’ to move into parent directory.
Answer : D
Explanation
cd ..(space between cd and ..) is correct instead of cd..
Q 20 - Per user configuration setting are found in the following file of user’s home directory.
Answer : B
Explanation
Aliases, imported environment variables, etc are part of the configuration settings.
Q 21 - General purpose UNIX command are found typically in the following directory.
Answer : C
Explanation
Answer : C
Explanation
du stands for disk usage.
Answer : B
Explanation
bsh − Bourne shell is the very earliest and most widely used.
Q 24 - What is the key combination to indicate for most of the UNIX command that input is completed?
Answer : A
Explanation
As an example you will be logged out when you ctrl+d at console end, indicating no input for the shell.
Q 25 - Which command can be used to query for terminal type being in use?
Answer : D
Explanation
tty − Terminal type.
Answer Sheet
Question Number | Answer Key |
---|---|
1 | D |
2 | B |
3 | C |
4 | B |
5 | B |
6 | A |
7 | C |
8 | D |
9 | B |
10 | B |
11 | A |
12 | C |
13 | A |
14 | B |
15 | B |
16 | B |
17 | D |
18 | D |
19 | D |
20 | B |
21 | C |
22 | C |
23 | B |
24 | A |
25 | D |