The correct answer is B.
/etc/exports. This file contains a list of local directories that are shared with remote hosts and the permissions that those remote hosts have on those directories. The
/dev/exports files do not exist and are not used for mounting remote devices.
When we execute a C program, the CPU runs in user mode. Therefore, the correct answer is A. “user.” In user mode, the CPU executes instructions that are part of the user program, but it cannot execute privileged instructions that are reserved for the operating system kernel in kernel mode. Supervisory and system modes are not typically used in modern computer systems.
The command used for removing files in most Unix-based systems (such as Linux and macOS) is
rm. Therefore, the correct answer is A.
cd command is used for changing the current working directory,
delete are commands used for removing files in some other operating systems (such as MS-DOS and Windows), and
clear is a command used for clearing the terminal screen.
Server programs that provide remote network and administration services and are usually spawned automatically at system start-up are called “daemons.” Therefore, the correct answer is A. “Daemons.” Daemons are background processes that run continuously and perform various tasks, such as handling incoming network requests or providing services to other programs. Init is a process management system in Unix-based operating systems that starts and stops other processes, system utilities are programs that perform various system-level tasks, links are shortcuts to files or directories, and the operating system is the core software that manages the hardware and provides services to other programs.
--extract) option is used. Therefore, the correct answer is D.
-x. This option tells tar to extract files from the archive. The
--verbose) options are used for creating archives, compressing archives, and displaying verbose output, respectively.
The command used to show all processes running on a machine is
top. Therefore, the correct answer is B.
top. When executed, the
top command displays a dynamic real-time view of the system’s processes, including their resource usage and other information. The
grep command is used to search for a specific pattern in a file or output, the
kill command is used to terminate a running process, the
ls command is used to list the contents of a directory, and the
cd command is used to change the current working directory.
Among the options listed,
shell is not a text editor in Linux or Unix. Therefore, the correct answer is D.
shell. A shell is a command-line interface used to interact with the operating system and run commands, but it is not a text editor. The
nano commands, on the other hand, are all text editors that can be used to create or edit files in Linux or Unix.
The Linux executable files are typically found in the
/usr/bin directories. Therefore, the correct answer is B.
/bin directory contains essential command-line utilities and system executables that are required for basic system operations, such as file management, process control, and network configuration. The
/etc directory contains system configuration files, the
/boot directory contains boot loader files and the kernel image, and the
/lib directory contains shared library files that are required by programs at runtime. While some executables may also be located in these directories, they are not primarily intended for holding executable files.
The command used to list the contents of directories on a server in most Unix-based systems (such as Linux and macOS) is
ls. Therefore, the correct answer is D.
ls. When executed, the
ls command displays a list of files and directories in the current working directory, or in the specified directory. The
tar command is used for creating and manipulating archive files, the
dir command is used in some other operating systems (such as MS-DOS and Windows) to display the contents of directories, and the
lp command is used for sending print jobs to a printer.
Adding a machine name to the file
/etc/x0.host allows that machine to be accessed using X. Therefore, the correct answer is D. “Allows that machine to be accessed using X.”
/etc/x0.hosts is used to configure access control for the X Window System, which provides a graphical user interface for Unix-based systems. By adding a machine name to this file, you are specifying that the X server running on that machine is allowed to accept connections from other hosts that have access to the X display. This is a way of granting remote access to the X display for other machines on the network.
Option A, “Restricts that machine to a particular X port” and option B, “Allows that machine to use a specific X port” are not accurate descriptions of the function of the
/etc/x0.hosts file. Option C, “Restricts that machine from being accessed using X” is the opposite of the correct answer, as adding a machine name to the file actually allows access to that machine using X.
The change directory command to move to the parent directory is
cd ... Therefore, the correct answer is B.
In Unix-based systems, the
cd command is used to change the current working directory. The
.. notation is used to refer to the parent directory, which is the directory that contains the current working directory. Therefore,
cd .. moves up one level in the directory hierarchy and sets the parent directory as the current working directory.
cd ~, is used to change the current working directory to the user’s home directory. Option C,
cd, is used to change the current working directory to the user’s home directory, which is the default behavior of the
cd command with no arguments. Option D,
cd -, is used to switch between the current and previous directories.
12. To remove/delete files in UNIX, what command do we use? A. rmdir B. rm C. del D. mv E. None of these
To remove or delete files in Unix-based systems (such as Linux and macOS), we use the
rm command. Therefore, the correct answer is B.
rm command is used to delete files and directories in Unix-based systems. It can be used with various options to specify the behavior of the deletion operation. For example, the
-r option is used to delete directories and their contents recursively, and the
-f option is used to force deletion without prompting for confirmation.
rmdir, is used to remove empty directories. Option C,
del, is not a valid command in Unix-based systems, but it is used in some other operating systems (such as MS-DOS and Windows) to delete files. Option D,
mv, is used to rename or move files and directories, but it does not delete them. Therefore, the correct answer is B.
The statement “cpio program can be used with redirection and piping” is true. Therefore, the correct answer is A. True.
In Unix-based systems, the
cpio command is used to create, extract, and manipulate archive files. It can read input from standard input (using redirection or piping) and write output to standard output (using piping). This makes it possible to use
cpio in combination with other commands in shell scripts and command pipelines.
For example, the following command creates a
tar archive of a directory and pipes it to
cpio, which in turn extracts it to another directory:
tar cf - /path/to/directory | cpio -idm /path/to/destination
Here, the output of the
tar command is piped to the input of the
cpio command using the
| (pipe) operator. The
cpio command extracts the archive to the specified destination directory using the
The popular Linux utility to search for text pattern matching in a file is
grep. Therefore, the correct answer is B.
grep is a powerful command-line tool for searching for text patterns in one or more files or streams. It stands for “global regular expression print”. It can search for text using a variety of regular expressions, and can perform advanced text processing tasks such as filtering and formatting.
For example, the following command searches for the word “example” in all files with the “.txt” extension in the current directory and its subdirectories:
grep -r "example" *.txt
-r option tells
grep to search recursively in subdirectories, and the
*.txt argument specifies the file pattern to search. The output of the command is a list of filenames and line numbers where the matching pattern was found.
The names given to the various parts I, II, and III of the permission are:
- I: User permissions
- II: Group permissions
- III: Other (or world) permissions
Therefore, the correct answer is A. user, group, others.
In Unix-based systems, file and directory permissions are represented by a 10-character string that specifies the read, write, and execute permissions for the owner, group, and other users, respectively. The first character of the string indicates the file type (e.g.,
- for a regular file,
d for a directory, etc.), while the remaining nine characters are divided into three groups of three characters each, representing the permissions for the owner, group, and other users, in that order. For example, the permission string
-rw-r--r-- indicates that the owner has read and write permissions, while group and other users have only read permissions.
The RAID type that works across disks is: D. RAID 0
RAID (Redundant Array of Inexpensive Disks) is a technology used to combine multiple physical disk drives into a single logical unit for data storage, with the goal of improving performance, reliability, or both. RAID 0, also known as striping, is a configuration that distributes data evenly across two or more disks without redundancy, meaning that if one disk fails, all data is lost. However, this configuration provides improved read and write performance, as data can be read from or written to multiple disks simultaneously. Therefore, option D is the correct answer.
The offset used with lseek system call to set the offset pointer to the end of the file is: B. SEEK_END
The lseek system call is used to change the file offset of the open file. It takes three arguments: file descriptor, offset, and whence. The whence argument specifies how the offset is interpreted. SEEK_SET seeks relative to the beginning of the file, SEEK_CUR seeks relative to the current file offset, and SEEK_END seeks relative to the end of the file. Therefore, option B is the correct answer.
Another name for “root” is: B. Superuser
In Linux and Unix operating systems, “root” is the highest level of access, and the user with this level of access is often called the “superuser”. The superuser has complete control over the system, including the ability to modify system files, install software, and change system settings. Therefore, option B is the correct answer.
The first 20 lines in a file messages.txt can be displayed using which command?
The correct command to display the first 20 lines of a file messages.txt in Linux or Unix is: B. head -20 messages.txt
head command is used to display the first few lines of a file, and the
-20 option is used to specify the number of lines to display. Therefore, option B is the correct answer. Option A and C are incorrect because there is no command called “first” in Linux or Unix. Option D is incorrect because the file extension “.txt” is missing. Option E is also correct, but it includes the “.txt” file extension unnecessarily.
The correct answer is B. -c. The -c option is used with the tar command to create a new archive.
The correct answer is A. First three numbers. Two machines are on the same subnet if the first three numbers of their IP addresses are the same. These three numbers form the network identifier portion of the IP address, which identifies the network on which the device is located. The last number of the IP address is the host identifier portion, which identifies a specific device on the network.
True. The superuser (root) can set the sticky bit on files and directories.
grep is used for filtering text based on a given pattern or regular expression.
RAID 10 uses the functionalities of RAID 1 and 0.
A. if disk fills up while write is in progress.
Note: write system call returns the number of bytes successfully written to a file or -1 in case of an error.
In most Linux/Unix systems, all user information is stored in the file
The Linux command that can be used to determine the available space on local hard-disk partitions is
The mv command in open source OS is used for Moving and renaming a file.
Answer : A. /
In Linux, the user account with the highest privilege is the root account.
The appropriate command for browsing the web on text only is C. lynx.
The correct answer is A. pipe(|).
B. The /tmp directory is a temporary location that system administrators regularly empty without warning.
D. Google Chrome OS is not an example of Linux server distribution. It is a Linux-based operating system designed by Google primarily for web applications.
chgrp is used to change the group that a file or directory belongs to.