Dumps Moneyack Guarantee - 702-100 Dumps UpTo 50% Off
Updated Sep-2024 Pass 702-100 Exam - Real Practice Test Questions
NEW QUESTION # 29
Which of the following commands can be used to connect to a remote TCP service?
- A. connect
- B. service
- C. listen
- D. netcat
- E. portstat
Answer: D
Explanation:
Explanation
The command netcat is a versatile networking utility that can be used to read from and write to network connections using TCP or UDP protocols. It is often used for debugging and investigating the network and can be used to connect to a remote TCP service.
References:
BSD Specialist Exam 702 Objectives - Linux Professional Institute
FreeBSD Handbook - Networking
NEW QUESTION # 30
Which syslog configuration line sends all messages from the auth facility to the remote syslog server logger.
example. org'?
- A. auth.* syslog://logger.example.org/
- B. auth.* logger.example.org:auth
- C. auth.* @logger.example.org
- D. auth.* |logger.example.org
- E. auth.*:logger.example.org
Answer: C
Explanation:
Explanation
The correct configuration line for sending all messages from the auth facility to a remote syslog server is auth.* @logger.example.org. In syslog configuration, the auth.* specifies the facility and priority, where auth is the facility for security/authorization messages, and * represents all priorities. The @ symbol is used to indicate that the messages are to be sent to a remote server, followed by the hostname of the remote syslog server. References:
FreeBSD Handbook - Logging
Linux Professional Institute BSD Specialist Exam Objectives
NEW QUESTION # 31
Consider the following file legal file:
disclosure
non-disclosure
non-disclosure
Which line or lines in the file does the following command match? Note the space after the dash within the brackets.
grep "non [-] disclosure" legalfile
- A. non-disclosure only
- B. non-disclosure only
- C. disclosure and non-disclosure only
- D. non-disclosure and non-disclosure Only
- E. disclosure only
Answer: D
Explanation:
Explanation
The command grep "non [-] disclosure" legalfile matches the lines in the file that contain the pattern non [-] disclosure, where the brackets indicate a character class that matches either a space or a dash. Therefore, the lines that contain non-disclosure or non - disclosure are matched by the command, while the line that contains disclosure only is not matched. The file has two lines that contain non-disclosure, so the correct answer is E. non-disclosure and non-disclosure Only. References:
grep - IBM
Character Classes and Bracket Expressions - GNU
NEW QUESTION # 32
Which device stands for the first BSD disk slice in the disk label on the first partition on the second SATA disk on OpenBSD?
- A. /dev/sdlp2d
- B. /dev/sdla
- C. /dev/sata2a
- D. /dev/d2sl
- E. /dev/slld2
Answer: A
Explanation:
Explanation
According to the BSD disklabel documentation1, the device name for a BSD disk slice consists of three parts:
the disk name, the partition letter, and the slice number. The disk name is determined by the driver and the order of detection, and it usually follows the pattern of sdX, where X is a letter from a to z. The partition letter is a lowercase letter from a to p, excluding c, which is reserved for the whole disk. The slice number is a decimal number from 0 to 15, indicating the MBR partition that contains the BSD disklabel. Therefore, the device name for the first BSD disk slice in the disk label on the first partition on the second SATA disk on OpenBSD is /dev/sdlp2d, where sdl is the disk name, p is the partition letter, and 2 is the slice number.
References1: BSD disklabel - Wikipedia
NEW QUESTION # 33
Which configuration file defines when log files are rotated'?
- A. /etc/newsyslog.conf
- B. /etc/syslog.conf
- C. /etc/rc.logd
- D. /etc/rc.d/syslogd
- E. /etc/logs.conf
Answer: A
Explanation:
Explanation
The /etc/newsyslog.conf file is the configuration file for the newsyslog command, which is used to rotate log files on BSD systems. The newsyslog command is typically run by cron at regular intervals to check if any log files need to be rotated based on the criteria specified in the /etc/newsyslog.conf file. The file contains a series of entries, one per line, that define the log file name, the owner and group, the mode, the count, the size, the when, the flags, and the pidfile for each log file. For example, the following entry in the /etc/newsyslog.conf file:
/var/log/messages root:wheel 644 7 * @T00 Z /var/run/syslog.pid
means that the /var/log/messages file is owned by root and belongs to the wheel group, has the mode 644, is rotated 7 times, has no size limit, is rotated at midnight every day, is compressed after rotation, and the process ID of syslogd is read from /var/run/syslog.pid and sent a signal to reopen the log file.
The other options are either invalid files or belong to other purposes. For example, /etc/logs.conf is not a valid file, /etc/rc.logd is a startup script for the log daemon, /etc/rc.d/syslogd is a startup script for the syslog daemon, and /etc/syslog.conf is the configuration file for the syslog daemon.
References:
[newsyslog.conf] - FreeBSD newsyslog.conf(5) Manual Page
[newsyslog] - FreeBSD newsyslog(8) Manual Page
[Log File Rotation] - FreeBSD Handbook
NEW QUESTION # 34
Given the following listing
-rw-r-r- 1root whee115254 Nov 13 08:55 bobsfile
How can the superuser grant the user bob write permission to this file?
- A. chgrp bob bobsfile
- B. chown bob:bob bobsfile
- C. vipw -u bob bobsfile
- D. chmod +x bobsfile
- E. chperm 664 bobsfile
Answer: B
Explanation:
Explanation
The command chown changes the ownership of a file or directory. The syntax is chown user:group file, where user is the new owner and group is the new group of the file. In this case, the superuser can grant the user bob write permission to the file by changing both the owner and the group of the file to bob. This way, bob will have the same permissions as the original owner, which is read and write. Alternatively, the superuser can also use the command chmod to change the permissions of the file without changing the ownership. For example, chmod g+w bobsfile will add write permission to the group, and chmod o+w bobsfile will add write permission to others. However, these commands will also affect other users who belong to the same group or are not the owner or the group of the file. References:
FreeBSD Handbook: File and Directory Ownership
FreeBSD Handbook: File and Directory Permissions
Linux Professional Institute BSD Specialist: 702.1 Filesystem and Devices
NEW QUESTION # 35
Which command finds all directories within the current user's home directory?
- A. find / -d | home
- B. find - -type d
- C. find -uid myname
- D. find. -dir
- E. find -d home
Answer: B
Explanation:
Explanation
The find command is used to search for files and directories that match certain criteria. The - -type option specifies the type of file to look for, and the d argument means directories. The . argument means the current directory. Therefore, the command find - -type d searches for all directories within the current directory. The other options are either invalid or do not match the question. References: 1:
https://www.comptia.org/training/books/a-core-1-220-1101-study-guide, page 301 2:
https://www.howtogeek.com/771399/how-to-use-the-find-command-in-linux/, section "The Linux find Command"
NEW QUESTION # 36
What is the purpose of the nice command'?
- A. Run a command with limited access to a specified directory
- B. Run a command with a non-standard priority.
- C. Run a command with additional secondary groups.
- D. Run a command with the permissions of another user
- E. Run a command with additional filesystem permissions
Answer: B
Explanation:
Explanation
The nice command is used to run a command with a modified scheduling priority, which affects how much CPU time the command receives. The priority can be specified by the -n option, which takes an integer value between -20 and 19, where lower values indicate higher priority. By default, the nice value is incremented by
10, which means the command runs with lower priority than normal. Only the superuser can specify a negative increment, which means the command runs with higher priority than normal. For example, the command nice
-n 5 date runs the date command with a priority of 5, while the command nice -n -10 ls runs the ls command with a priority of -10, but only if the user is the superuser. The nice command is useful for running CPU-intensive commands that do not need to finish quickly, or for running commands that need more CPU time than normal. References:
nice - FreeBSD, the manual page for the nice command on FreeBSD.
HowTo: Use ps, kill, nice, and killall To Manage processes in FreeBSD and OS X Unix Operating System - nixCraft, a tutorial on how to use the nice command and other process management commands on FreeBSD and OS X.
NEW QUESTION # 37
Which command can be used to display the local filesystems that are currently mounted'?
- A. df -h C du -s
- B. cat /etc/fstab
- C. mount -a
- D. rpcinfo
Answer: A
Explanation:
Explanation
The command df -h displays the disk space usage of all mounted filesystems in a human-readable format. It shows the size, used, available, and percentage of each filesystem, as well as the mount point. This command can be used to check the local filesystems that are currently mounted.
https://unix.stackexchange.com/questions/24182/how-to-get-the-complete-and-exact-list-of-mounted-filesystems
https://www.tecmint.com/find-mounted-file-systems-in-linux/
https://itslinuxfoss.com/check-filesystem-mounted-linux/
NEW QUESTION # 38
Which command shows all processes owned by the user bob?
- A. pgrep -u bob
- B. last -p bob
- C. ps -o -a bob
- D. who -1 bob
- E. top bob
Answer: A
Explanation:
Explanation
The pgrep command is used to find processes by various criteria, such as user name, group name, process ID, command name, etc. The -u option specifies the user name or user ID to match. Therefore, the command pgrep
-u bob will show all processes owned by the user bob. The output will be a list of process IDs, one per line. To show more information about the processes, such as command name, arguments, state, etc., the -l, -a, and -f options can be used. For example, the command pgrep -l -u bob will show the process ID and the command name for each process owned by bob. References:
pgrep - FreeBSD, the manual page for the pgrep command on FreeBSD.
How to use pgrep and pkill commands in Linux - Linuxize, a tutorial on how to use the pgrep and pkill commands in Linux.
NEW QUESTION # 39
What FreeBSD and NetBSD command manages services started at boot time? (Specify ONLY the command without any path or parameters.)
Answer:
Explanation:
sysrc
Explanation
The sysrc command is used in FreeBSD and NetBSD to manage system-wide daemon and service settings, including those that are started at boot time. It allows administrators to safely edit system rc files, such as /etc/rc.conf, where services to be started at boot time are specified1.
References:
FreeBSD Handbook - rc.conf
FreeBSD Man Pages - sysrc
NEW QUESTION # 40
Which of the following tar options handle compression'? (Choose TWO correct answers)
- A. -v
- B. -x
- C. -z
- D. -J
- E. -c
Answer: C,D
Explanation:
Explanation
The tar command is used to create or extract compressed archive files on BSD systems. It can handle various compression formats, such as gzip, bzip2, xz, and lzma. The tar command takes different options to specify the compression type, such as -z for gzip, -j for bzip2, -J for xz, and -Z for lzma. The other options are not related to compression, but to other functions of the tar command, such as -x for extracting, -c for creating, and -v for verbose output. References:
[tar(1) - OpenBSD manual pages]
[FreeBSD Handbook - Chapter 3. Unix Basics]
[FreeBSD Handbook - Chapter 18. Storage]
NEW QUESTION # 41
What file contains the configuration for the network interface em0on an OpenBSD system'? (Specify the full name of the file, including path.)
Answer:
Explanation:
/etc/hostname.em0
Explanation
The file /etc/hostname.em0 contains the configuration for the network interface em0 on an OpenBSD system.
This file specifies the IP address, netmask, gateway, and other options for the interface. The file is read by the netstart script during boot or when the interface is restarted. The file name is derived from the interface name, which is usually based on the driver name and the device number. For example, em0 is the first interface using the em driver, which supports Intel PRO/1000 network adapters.
References:
Networking | OpenBSD Handbook
[hostname.if(5) - OpenBSD manual pages]
NEW QUESTION # 42
Which of the following excerpts is a valid if condition in the Bourne shell?
- A.

- B.

- C.

- D.

Answer: D
Explanation:
Explanation
The excerpt C is a valid if condition in the Bourne shell because it uses the correct syntax and operators for the test command. The syntax of the if statement in the Bourne shell is:
if test-commands; then consequent-commands; [elif more-test-commands; then more-consequents;] [else alternate-consequents;] fi The test-commands are any commands that return a status of 0 (true) or non-zero (false). The test command is a common way to perform various tests on files, strings, and numbers. The test command has the following format:
test expression
The expression consists of one or more primaries, which are unary or binary operators that evaluate to true or false. The primaries can be combined with the following operators:
! expression: Logical NOT expression -a expression: Logical AND expression -o expression: Logical OR ( expression ): Parentheses for grouping The excerpt C uses the test command with the following expression:
"$var" = "test"
This expression tests if the value of the variable $var is equal to the string "test". The = operator is a string comparison operator that returns true if the strings are equal. The double quotes around the variable and the string are used to prevent word splitting and globbing by the shell. The spaces around the operator are also required by the test command.
The excerpt C also uses the correct syntax for the then and fi keywords, which mark the beginning and the end of the if statement. The then keyword must be on the same line as the test command, or on a new line after a semicolon. The fi keyword must be on a new line.
The other excerpts are invalid for various reasons:
The excerpt A uses the && operator instead of the -a operator for logical AND. The && operator is a shell operator that executes the second command only if the first command succeeds. The test command does not recognize the && operator as a valid argument. The excerpt A also uses the != operator instead of the -ne operator for numeric comparison. The != operator is a string comparison operator that returns true if the strings are not equal. The -ne operator is a numeric comparison operator that returns true if the numbers are not equal.
The excerpt B uses the [ [ construct instead of the test command. The [ [ construct is a shell keyword that performs conditional expressions similar to the test command, but with some extensions and differences. The [ [ construct is not part of the POSIX standard and is not supported by all shells. The Bourne shell does not support the [ [ construct, and will treat it as a command name. The excerpt B also uses the wrong syntax for the then keyword, which must be on a new line or after a semicolon.
The excerpt D uses the wrong syntax for the test command, which requires a space after the opening bracket and before the closing bracket. The excerpt D also uses the wrong syntax for the fi keyword, which must be on a new line.
NEW QUESTION # 43
Which of the following programs can be used to enumerate all responsive hosts on a subnet?
- A. traceroute
- B. netstat
- C. route
- D. rtso1
- E. nmap
Answer: E
Explanation:
Explanation
Nmap is a program that can be used to enumerate all responsive hosts on a subnet. Nmap stands for Network Mapper, and it is a tool that can perform network discovery, port scanning, service detection, vulnerability assessment, and more. Nmap can send different types of packets to probe the hosts on a subnet and determine which ones are alive and what services they are running. Nmap can also perform OS fingerprinting, which can identify the operating system of the target hosts. Nmap has many options and features that can customize the scan according to the user's needs and preferences. The other programs are not suitable for enumerating all responsive hosts on a subnet, because:
A: traceroute: This program is used to trace the route of packets from the source host to the destination host. It can show the intermediate hops and the latency of each hop. However, it cannot show all the hosts on a subnet, only the ones that are on the path to the destination.
B: netstat: This program is used to display the status of network connections, routing tables, interface statistics, and more. It can show the local and remote addresses and ports of the active connections, but it cannot show all the hosts on a subnet, only the ones that are connected to the local host.
D: rtso1: This is not a valid program name, but it may be a typo for rtso, which is a program that can perform TCP SYN scanning. However, this program is not as versatile and powerful as nmap, and it can only scan TCP ports, not UDP or other protocols.
E: route: This program is used to manipulate the routing table, which is used to determine the next hop for a packet based on its destination address. It can show the destination, gateway, interface, and flags of each route, but it cannot show all the hosts on a subnet, only the ones that are reachable via a specific gateway. References: 6: https://nmap.org/book/man.html 7:
https://www.freebsd.org/cgi/man.cgi?query=traceroute&sektion=8 :
https://www.freebsd.org/cgi/man.cgi?query=netstat&sektion=1 :
https://www.freebsd.org/cgi/man.cgi?query=rtso&sektion=1 :
https://www.freebsd.org/cgi/man.cgi?query=route&sektion=8
NEW QUESTION # 44
Which command locks the user account bob on a FreeBSD system?
- A. pw lock bob
- B. audit_user -1 bob
- C. lockuser bob
- D. vipw lock bob
- E. usermod lock bob
Answer: A
Explanation:
Explanation
The pw utility is a command-line utility for the FreeBSD system user and group files, allowing the superuser an easy way of adding, modifying and removing users and groups. To lock a user account on a FreeBSD system, the pw lock command can be used with the username as an argument. This will prevent the user from logging in orchanging their password. To unlock a user account, the pw unlock command can be used with the username as an argument. This will restore the user's access to the system. References:
FreeBSD locking an account - nixCraft
FreeBSD: How To Add, Delete Or Modify Users
How to: FreeBSD User Administration - Atlantic.Net
NEW QUESTION # 45
While in the csh or tcsh shell, which command changes the timezone environment variable to GMT?
- A. export TZ=GMT
- B. setenv TZ GMT
- C. env TZ=GMT
- D. environ TZ GMT
- E. TZ=GMT; export TZ
Answer: B
Explanation:
Explanation
The setenv command is used to set an environment variable in the csh or tcsh shell. The syntax is setenv VAR VALUE, where VAR is the name of the variable and VALUE is the value to assign to it. The TZ variable is used to specify the timezone for the shell and its subprocesses. To set the timezone to GMT (Greenwich Mean Time), the command is setenv TZ GMT. This will affect the output of commands like date and ls that display time information. The other options are either invalid syntax or belong to other shells, such as bash or sh.
References:
setenv - Linux setenv command help and examples1
TZ - FreeBSD Environment Variables2
NEW QUESTION # 46
......
Download Free Lpi 702-100 Real Exam Questions: https://2cram.actualtestsit.com/Lpi/702-100-exam-prep-dumps.html