Which of the following commands is used to show the information about a directory or a symbolic link?

Prepare for the LPI Linux Essentials Exam with our comprehensive quiz. Study with interactive flashcards and multiple choice questions, with detailed hints and explanations for each. Ace your exam with confidence!

The command that shows information about a directory or a symbolic link is "ls -d." When using the "ls" command with the "-d" option, it instructs the system to display the directory itself rather than its contents. This is particularly useful when you want to view attributes such as permissions, ownership, and timestamps of the directory or symbolic link without listing the files contained within it.

For instance, when you run "ls -d" followed by a directory name, you get output that describes that directory, allowing you to see the relevant metadata, which makes this option specifically designed for examining directory properties.

The other options focus on different functionalities: "ls -s" displays the size of files alongside their names, which does not focus on directory or symbolic link info. The commands starting with "ln," which is used for creating links, do not pertain to displaying information either; instead, they are utilized to create hard links and symbolic links, with the -s option specifically for making symbolic links. Hence, only "ls -d" serves the purpose of showing information about a directory or symbolic link directly.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy