nerdexam
LPI

010-160 · Question #78

What is true about links in a Linux file system?

The correct answer is D. A symbolic link can point to a file on another file system. A symbolic link is a special file that stores a path reference and can cross file system boundaries, unlike hard links which are bound to a single file system.

Finding Your Way on a Linux System

Question

What is true about links in a Linux file system?

Options

  • AA symbolic link can only point to a file and not to a directory.
  • BA hard link can only point to a directory and never to a file.
  • CWhen the target of the symbolic link is moved, the link is automatically updated.
  • DA symbolic link can point to a file on another file system.
  • EOnly the root user can create hard links.

How the community answered

(21 responses)
  • A
    14% (3)
  • B
    5% (1)
  • C
    5% (1)
  • D
    76% (16)

Why each option

A symbolic link is a special file that stores a path reference and can cross file system boundaries, unlike hard links which are bound to a single file system.

AA symbolic link can only point to a file and not to a directory.

Symbolic links can point to both files and directories; for example, /run/lock is commonly a symlink to a directory.

BA hard link can only point to a directory and never to a file.

Hard links reference an inode directly and can only point to regular files, never to directories (with rare root-level exceptions), which is the opposite of what this choice states.

CWhen the target of the symbolic link is moved, the link is automatically updated.

When the target of a symbolic link is moved or renamed, the link is not updated automatically - it becomes a dangling (broken) symlink pointing to the old path.

DA symbolic link can point to a file on another file system.Correct

Symbolic links store a path string rather than an inode reference, so they can point to targets on entirely different file systems or partitions without restriction.

EOnly the root user can create hard links.

Any user with appropriate permissions in a directory can create hard links to files they own; root is not required.

Concept tested: Symbolic links vs hard links cross-filesystem behavior

Source: https://www.man7.org/linux/man-pages/man7/symlink.7.html

Topics

#symbolic links#hard links#filesystem links#cross-filesystem

Community Discussion

No community discussion yet for this question.

Full 010-160 Practice