1.
UNIX processes are owned by only one UID at a time.
Correct Answer
A. True
Explanation
In UNIX, each process is associated with a unique user identifier (UID) that determines the ownership and permissions of the process. This UID represents the user who initiated the process and has control over it. Therefore, it is true that UNIX processes are owned by only one UID at a time, ensuring proper access control and security within the operating system.
2.
Each UNIX process has its own set of environment variables.
Correct Answer
A. True
Explanation
Each UNIX process has its own set of environment variables. This means that each process can have its own unique values for environment variables, allowing for customization and flexibility. This is a fundamental feature of the UNIX operating system, as it allows processes to have different configurations and behaviors based on their specific environment variable settings.
3.
What is the name of the first process in a UNIX system?
Correct Answer
B. Init
Explanation
Init is the correct answer because it is the first process that is executed when a UNIX system starts up. It is responsible for initializing the system and starting other processes. Init has a process ID of 1 and is the parent process of all other processes in the system. It is essential for the proper functioning of the operating system and plays a crucial role in managing system resources and launching user applications.
4.
What are valid ways to find more information about commands on a system?
Correct Answer
E. All of the above
Explanation
All of the options listed (apropos, man, info, --help or -h as a program argument) are valid ways to find more information about commands on a system. The "apropos" command is used to search for commands based on their descriptions, the "man" command displays the manual pages for a command, the "info" command provides detailed information about a command, and using "--help" or "-h" as a program argument displays the help information for that specific program. Therefore, all of these options are valid ways to find more information about commands on a system.
5.
How can you filter results from apropos so that only manual pages about executable programs are displayed?
Correct Answer
A. | grep \(1
Explanation
The correct answer is "| grep \(1". This answer suggests using the grep command with the pattern "\(1" to filter the results from apropos. The "\(1" pattern is commonly used to refer to manual pages about executable programs in Unix-like systems.
6.
UNIX provides built in tools to monitor system activity such as CPU, network and disk usage.
Correct Answer
A. True
Explanation
The statement is true because UNIX operating systems come with various built-in tools that allow users to monitor the activity of their system. These tools can provide information about CPU usage, network activity, and disk usage, among other system metrics. By using these tools, users can gain insights into the performance and resource utilization of their system, allowing them to optimize and troubleshoot any issues that may arise.
7.
Which utility would be most useful for finding which programs are consuming the most CPU on a UNIX system?
Correct Answer
C. Prstat
Explanation
Prstat is the most useful utility for finding which programs are consuming the most CPU on a UNIX system. It is specifically designed for this purpose and provides detailed information about CPU usage, including the percentage of CPU time consumed by each program. Prstat allows system administrators to identify and troubleshoot CPU-intensive processes, helping to optimize system performance and resource allocation.
8.
Which command would show you disk activity every three seconds on a UNIX system?
Correct Answer
B. Iostat -x 3
Explanation
The correct answer is "iostat -x 3". The iostat command is used to monitor system input/output (I/O) statistics, including disk activity. The "-x" option displays extended statistics, providing more detailed information about disk utilization. The "3" argument specifies that the command should be executed every three seconds, allowing for real-time monitoring of disk activity on the UNIX system.
9.
What are some methods of scheduling processes to run on a UNIX system at a given time?
Correct Answer
D. All of the above
Explanation
The correct answer is "All of the above" because all three methods mentioned (at, cron, xjob) are valid ways to schedule processes to run on a UNIX system at a given time. The "at" command allows for one-time scheduling of a process, the "cron" command enables scheduling recurring tasks, and the "xjob" command is a graphical interface for managing scheduled tasks. Therefore, all three options are valid methods for scheduling processes on a UNIX system.
10.
Which of the commands allow you to view the contents of a file?
Correct Answer
E. All of the above
Explanation
All of the commands mentioned in the options (head, tail, cat, less/more) allow you to view the contents of a file. The "head" command displays the first few lines of a file, the "tail" command displays the last few lines, the "cat" command displays the entire contents of a file, and the "less/more" commands allow you to view the contents of a file page by page. Therefore, all of the above commands can be used to view the contents of a file.
11.
What file editor would you use to modify a file in UNIX?
Correct Answer
C. Nano
Explanation
Nano is a popular file editor in UNIX systems. It is a command-line text editor that is easy to use and has a user-friendly interface. It allows users to modify files directly in the terminal, making it a convenient choice for editing files in UNIX.
12.
What command lets you search a text stream for a string?
Correct Answer
C. Grep
Explanation
The command "grep" is used to search a text stream for a string. It is a powerful tool commonly used in Unix-like operating systems. With grep, you can specify a pattern or string to search for within a file or a stream of text. It allows for various options and regular expressions to perform complex searches and pattern matching.
13.
What command lets you find files in the current directory that were modified in the last ten minutes?
Correct Answer
C. Find . -mmin -10
Explanation
The command "find . -mmin -10" is the correct answer because it uses the "find" command to search for files in the current directory ("-mmin") that were modified within the last 10 minutes ("-10"). This command will locate and display the files that meet this criteria.
14.
What are the file copy, move and delete commands?
Correct Answer
D. Cp, mv, rm
Explanation
The correct answer is cp, mv, rm. These are the commonly used commands for file copy, move, and delete operations in various operating systems. "cp" is used to copy files, "mv" is used to move or rename files, and "rm" is used to delete files. These commands are widely used and recognized in Unix-like systems, including Linux and macOS.
15.
What utility can copy only the parts of a file that have changes?
Correct Answer
B. Rsync
Explanation
Rsync is a utility that can copy only the parts of a file that have changes. It achieves this by comparing the source and destination files and transferring only the differences between them. This makes rsync an efficient tool for synchronizing files and directories between different locations, especially over a network. It is commonly used for backup and mirroring purposes, as it minimizes the amount of data that needs to be transferred.