- 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 - Standard I/O Streams
- Unix / Linux - File Links
- 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 III
Q 1 - Choose the command which can display only your information.
Answer : B
Explanation
Q 2 - How you list only hidden files?
Answer : A
Explanation
Q 3 - Which command can be used to restrict the messages to be written onto you terminal using write command?
Answer : A
Explanation
You can turn off messages by executing the command – mesg with ‘n’ as argument.
Q 4 - Which character can be used to delete a character at the cursor position in vi?
Answer : C
Explanation
In the command mode of vi editor ‘x’ removes the character at cursor position.
Q 5 - Choose the correct from below to search for lines ending with the pattern using grep.
Answer : D
Explanation
The pattern can be enclosed in single quotes to suppress meaning of all the meta-characters special meanings.
Q 6 - Which command in command mode of vi saves the file without quitting?
Answer : D
Explanation
where ‘w’ means as write or say save.
Answer : B
Explanation
Q 8 - Which command can be used to create links for file/directory?
Answer : B
Explanation
ln is the command used to create hard/soft link for a file and hard link for a directory.
Q 9 - What does the following command do?
$ chmod o-r note
A - Read permission for others is removed
B - Read permission for others is added
Answer : D
Explanation
User/owner of the is reffered with ‘o’. ‘r’ means read permission bit.
Answer : B
Explanation
‘uname’ can display much more technical information about your hardware and OS apart from name of the OS.
Q 11 - Which command can be used to find resource limits?
Answer : B
Explanation
Answer : A
Explanation
Q 13 - Command to display in the format dd/mm/yy
Answer : B
Explanation
Q 14 - Display the ‘file’ contents page wise
Answer : C
Explanation
‘more’ holds the scrolling page wise. Hit space bar to continue reading to next page. Hit ‘q’ to quit from ‘more’.
Q 15 - How can you execute ‘date’ command staying within vi editor?
Answer : B
Explanation
Staying in command mode of vi, hit : and any command following exclamation (!).
Q 16 - Which command can give first found difference between two file after comparing?
Answer : B
Explanation
cmp command is used in general to find for equal files.
Q 17 - Following is the utility program to perform complex mathematical computation.
Answer : B
Explanation
bc is often referred to as basic calculator/bench calculator. bc is typically used as either a mathematical scripting language or as an interactive mathematical shell.
Q 18 - Command ‘sed’ is used for __
Answer : D
Explanation
sed is one of the early Unix commands built for command line processing of data files.
Q 19 - Which command can be used to count characters in a text file?
Answer : B
Explanation
wc, apart from counting characters it can also count number of line & words.
Answer : B
Explanation
ftp is the utility available in many platforms which gives the provision of copying files across different system.
Q 21 - Which command is used to change default permissions for files & directories at the time of creation?
Answer : D
Explanation
umask sets the mask value for files & directories at the time of creation.
Q 22 - What are the options used to list the contents of a .tar file?
Answer : B
Explanation
‘t’ to list out, ‘v’ is verbose mode & ‘f’ for target file.
Q 23 - Which command can be used to find a word from a text file?
Answer : D
Explanation
grep is a filter which can match for a pattern/word from lines of the file.
Answer : A
Explanation
Q 25 - Which command is used to get intermediate result in a pipeline of commands?
Answer : A
Explanation
Answer Sheet
Question Number | Answer Key |
---|---|
1 | B |
2 | A |
3 | A |
4 | C |
5 | D |
6 | D |
7 | B |
8 | B |
9 | D |
10 | B |
11 | B |
12 | A |
13 | B |
14 | C |
15 | B |
16 | B |
17 | B |
18 | D |
19 | B |
20 | B |
21 | D |
22 | B |
23 | D |
24 | A |
25 | A |
To Continue Learning Please Login
Login with Google