A user is asking the systems administrator for assistance with writing a script to verify whether a file exists. Given the following:
Which of the following commands should replace the
A user is asking the systems administrator for assistance with writing a script to verify whether a file exists. Given the following:
Which of the following commands should replace the
The correct conditional to check if a file exists and is a regular file is 'if [ -f "$filename" ]; then'. The '-f' flag checks if the supplied filename corresponds to an existing regular file. The correct syntax includes 'then' to specify the start of the block of commands to execute if the file exists. This makes option A the correct choice.
DRAG DROP -
As a Systems Administrator, to reduce disk space, you were tasked to create a shell script that does the following:
Add relevant content to /tmp/script.sh, so that it finds and compresses related files in /var/log without recursion.
INSTRUCTIONS:
Drag and drop snippets to fill the blanks to build a script that performs the actual compression of rotated log files.
If at any time you would like to bring back the initial state of the simulation, please click the Reset All button.
A systems administrator is deploying three identical, cloud-based servers. The administrator is using the following code to complete the task:
Which of the following technologies is the administrator using?
The provided code snippet is for deploying resources using Terraform. Key indicators of this include the 'resource' keyword, the use of interpolation syntax with '${}', and the '.tf' file structure conventions. Terraform is a tool used for building, changing, and versioning infrastructure safely and efficiently. It supports various infrastructure providers, including AWS, which is evident from the use of the 'ec2_instance' within the code.
Which of the following technologies can be used as a central repository of Linux users and groups?
LDAP (Lightweight Directory Access Protocol) can be used as a central repository of Linux users and groups. LDAP is a widely used protocol for directory services, allowing the storage and retrieval of information related to users, groups, and other resources in a network. This makes it an ideal choice for managing centralized user and group information across multiple Linux systems.
A systems administrator is troubleshooting connectivity issues and trying to find out why a Linux server is not able to reach other servers on the same subnet it is connected to. When listing link parameters, the following is presented:
Based on the output above, which of following is the MOST probable cause of the issue?
The most probable cause of the issue is that the network interface cable is not connected to a switch. The output shows that the state of the network interface eth0 is 'DOWN' and it also indicates 'NO-CARRIER', which means that the interface is not currently connected to a network. This typically suggests a physical disconnection, such as an unplugged cable or a problem with the switch.