nerdexam
Linux_FoundationLinux_Foundation

LFCS · Question #792

LFCS Question #792: Real Exam Question with Answer & Explanation

The correct answer is E: The source and the target are on different filesystems.. Creating a hard link to an ordinary file will fail if the source file and the target link are located on different filesystems.

Submitted by naveen.iyer· Apr 18, 2026Storage Management

Question

An administrator is trying to make a hard link to an ordinary file but ln returns an error. Which of the following could cause this?

Options

  • AThe source file is hidden.
  • BThe source file is read-only.
  • CThe source file is a shell script.
  • DThe administrator does not own the source file.
  • EThe source and the target are on different filesystems.

Explanation

Creating a hard link to an ordinary file will fail if the source file and the target link are located on different filesystems.

Common mistakes.

  • A. The hidden status (indicated by a leading dot) of a file does not prevent the creation of a hard link.
  • B. A read-only source file does not prevent the creation of a hard link, as hard linking only creates a new directory entry pointing to the existing inode.
  • C. The type of file content, such as a shell script, has no bearing on whether a hard link can be created.
  • D. File ownership is not a strict requirement for creating a hard link, as long as the user has appropriate permissions (e.g., write permission in the target directory).

Concept tested. Hard link filesystem limitations

Reference. https://www.gnu.org/software/coreutils/manual/html_node/ln-invocation.html

Topics

#Hard Links#Filesystems#Inodes#ln command

Community Discussion

No community discussion yet for this question.

Full LFCS PracticeBrowse All LFCS Questions