Which command can show the target of a symbolic link in a detailed listing?

Study for the OSCP Linux Exam. Use our flashcards and multiple-choice questions to test your skills. Each query comes with detailed hints and explanations to enhance your preparedness. Get ready to conquer the exam!

Multiple Choice

Which command can show the target of a symbolic link in a detailed listing?

Explanation:
Long listings reveal symbolic link targets. When you run ls -l on a symlink, the output includes an arrow and the destination (for example, linkname -> /path/to/target), showing exactly where the link points. That’s why this command is the best for showing the target in a detailed listing. Readlink prints only the target path itself, not a full listing; ls -d shows the link entry without resolving the target; and cat displays the contents of the target file, not the link’s destination.

Long listings reveal symbolic link targets. When you run ls -l on a symlink, the output includes an arrow and the destination (for example, linkname -> /path/to/target), showing exactly where the link points. That’s why this command is the best for showing the target in a detailed listing. Readlink prints only the target path itself, not a full listing; ls -d shows the link entry without resolving the target; and cat displays the contents of the target file, not the link’s destination.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy