Limited-Time Offer: Enjoy 50% Savings! - Ends In 0d 00h 00m 00s Coupon code: 50OFF
Welcome to QA4Exam
Logo

- Trusted Worldwide Questions & Answers

Most Recent LPI 102-500 Exam Dumps

 

Prepare for the LPIC-1 System Administrator Exam 102, Part 2 of 2, version 5.0 exam with our extensive collection of questions and answers. These practice Q&A are updated according to the latest syllabus, providing you with the tools needed to review and test your knowledge.

QA4Exam focus on the latest syllabus and exam objectives, our practice Q&A are designed to help you identify key topics and solidify your understanding. By focusing on the core curriculum, These Questions & Answers helps you cover all the essential topics, ensuring you're well-prepared for every section of the exam. Each question comes with a detailed explanation, offering valuable insights and helping you to learn from your mistakes. Whether you're looking to assess your progress or dive deeper into complex topics, our updated Q&A will provide the support you need to confidently approach the LPI 102-500 exam and achieve success.

The questions for 102-500 were last updated on May 4, 2025.
  • Viewing page 1 out of 47 pages.
  • Viewing questions 1-5 out of 234 questions
Get All 234 Questions & Answers
Question No. 1

Which of the following tasks can the date command accomplish? (Choose two.)

Show Answer Hide Answer
Correct Answer: A, E

The date command is used to display or set the system's date and time. The date command has the following syntax:

date [options] [+format] [time]

The options can modify the behavior of the date command, such as setting the time zone, printing the date in RFC 3339 format, or updating the hardware clock. The +format argument can specify the output format of the date command, using various conversion specifiers that represent different components of the date and time, such as %Y for the year, %m for the month, %d for the day, %H for the hour, %M for the minute, and %S for the second. The time argument can set the system's date and time, using the format MMDDhhmm[[CC]YY][.ss], where MM is the month, DD is the day, hh is the hour, mm is the minute, CC is the century, YY is the year, and ss is the second.

Therefore, the date command can accomplish the following tasks:

A . Set the system's date and time. For example, to set the system's date and time to November 8, 2023, 18:30:00, the command would be:

date 110818302023.00

E . Display time in a specific format. For example, to display the current date and time in the format YYYY-MM-DD HH:MM:SS, the command would be:

date +%Y-%m-%d %H:%M:%S

The other options in the question are not correct for this task. The date command cannot set the system's date but not the time, as the time argument requires both the date and the time components. The date command cannot calculate the time span between two dates, as it can only display or set the current date and time. The date command cannot print a calendar for a month or a year, as that is the function of the cal command.


LPI 102-500 Exam Objectives, Topic 105.1: Customize and use the shell environment

LPI 102-500 Study Guide, Chapter 5: Customizing Shell Environments, Section 5.1: Working with the Shell

date man page

Question No. 4

Which of the following find commands will print out a list of files owned by root and with the SUID bit set in /usr?

Show Answer Hide Answer
Correct Answer: A

This command will find all the files in the /usr directory that have the user ID (UID) of 0, which is the root user, and have the permission of 4000, which is the SUID bit. The SUID bit allows the file to be executed with the privileges of the file owner, regardless of who runs it. The -uid option tests for a specific UID, and the -perm option tests for a specific permission. The + sign before the permission means that at least those bits are set; the - sign means that exactly those bits are set. The other options are either invalid or do not match the criteria.Reference:

LPIC-1 Exam 102 Objectives, Topic 104: Devices, Linux Filesystems, Filesystem Hierarchy Standard, 104.4 Find system files and place files in the correct location, Key Knowledge Areas: Search for files by type, size, or time

find manual page, -uid and -perm options description

Find Command in Linux with Practical Examples, Example 8: Find Files with SUID and SGID Permissions


Question No. 5

What is the difference between the commands test -e path and test -f path?

Show Answer Hide Answer
Correct Answer: C

The test command is used to perform checks and comparisons on files and values. The -e option tests if a given path exists, regardless of its type (file, directory, link, etc.). The -f option tests if a given path exists and is a regular file, not a directory or a special file. For example, if we have a directory named dir and a file named file, we can use the test command as follows:

test -e dir && echo ''dir exists'' dir exists test -f dir && echo ''dir is a regular file'' (no output) test -e file && echo ''file exists'' file exists test -f file && echo ''file is a regular file'' file is a regular file


https://www.computerhope.com/unix/bash/test.htm

Unlock All Questions for LPI 102-500 Exam

Full Exam Access, Actual Exam Questions, Validated Answers, Anytime Anywhere, No Download Limits, No Practice Limits

Get All 234 Questions & Answers