1.
What is the meaning of this "../.."?
Correct Answer
A. Up two directories
Explanation
The meaning of "../.." is to go up two directories. In a file directory structure, each directory is represented by a forward slash ("/"). The "../" notation indicates going up one directory, and adding another "../" indicates going up another directory. Therefore, "../.." means going up two directories.
2.
What is the meaning of cd/ in UNIX?
Correct Answer
C. Root directory
Explanation
The meaning of "cd/" in UNIX is the root directory. In UNIX, "/" represents the highest level of the file system hierarchy, which is the root directory. The root directory is the starting point for navigating the file system and contains all other directories and files in the system. Using "cd/" in the command line would take the user to the root directory.
3.
You have to export declared environmental variables in the Bourne shell.
Correct Answer
A. True
Explanation
In the Bourne shell, it is necessary to export declared environmental variables in order to make them available to child processes. When a variable is exported, it becomes part of the environment and can be accessed by other processes that are spawned from the current shell. This allows for the sharing of variables between different processes. Therefore, the statement "True" is the correct answer as it accurately reflects the requirement to export declared environmental variables in the Bourne shell.
4.
Assign the value of variable var2 to var1.
Correct Answer
C. Var1=$var2
Explanation
The correct answer is "var1=$var2". This is because the question asks to assign the value of variable var2 to var1. In PHP, the dollar sign ($) is used to indicate a variable. Therefore, var1 should be assigned the value of the variable $var2.
5.
More than one file descriptor can point to the same file in UNIX.
Correct Answer
A. True
Explanation
In UNIX, it is possible for multiple file descriptors to point to the same file. This means that different processes or threads can access and manipulate the same file simultaneously. This feature allows for efficient sharing of file resources and facilitates inter-process communication. It also enables file locking mechanisms to be implemented, ensuring data integrity when multiple processes are accessing the same file.
6.
Which is true about assigning to variable in bash a null value?
Correct Answer
D. All of above
Explanation
All of the given options are true when it comes to assigning a null value to a variable in bash. In bash, a null value can be assigned using any of the following syntax: A="", A=, or A=''. These options all result in the variable A being assigned a null value.
7.
There are how many prompts in a UNIX system?
Correct Answer
C. Two
Explanation
A UNIX system typically has two prompts: the primary prompt and the secondary prompt. The primary prompt is displayed when the system is ready to accept a command, indicating that the user can input a command. The secondary prompt is displayed when the system expects additional input to complete a command, such as when a command spans multiple lines.
8.
The command to display environment variables is
Correct Answer
A. PRINTENV
Explanation
The correct answer is PRINTENV. This command is used to display the environment variables in a system. It is a common command in various operating systems and programming languages. By using PRINTENV, users can view the current values of environment variables, which are important for configuring and customizing the system's behavior.
9.
Which one of the given options is not the environment variable?
Correct Answer
B. READ
10.
The part of UNIX which is responsible for sending the basic instructions to the processor is
Correct Answer
B. Kernel
Explanation
The correct answer is Kernel. The kernel is the central component of the UNIX operating system and is responsible for managing the system's resources, including sending basic instructions to the processor. It acts as an interface between the hardware and the software, handling tasks such as memory management, process scheduling, and device management. The shell, on the other hand, is a command-line interface that allows users to interact with the kernel and execute commands. Therefore, the kernel is the part of UNIX that is responsible for sending the basic instructions to the processor.