nerdexam
Linux_Foundation

LFCS · Question #667

Which of the following pieces of information of an existing file is changed when a hard link pointing to that file is created?

The correct answer is C. Link count. When a hard link is created for an existing file, only the link count of that file is updated.

Submitted by ashley.k· Apr 18, 2026Storage Management

Question

Which of the following pieces of information of an existing file is changed when a hard link pointing to that file is created?

Options

  • AFile size
  • BModify timestamp
  • CLink count
  • DInode number
  • EPermissions

How the community answered

(28 responses)
  • A
    4% (1)
  • C
    86% (24)
  • D
    7% (2)
  • E
    4% (1)

Why each option

When a hard link is created for an existing file, only the link count of that file is updated.

AFile size

A hard link simply provides another name for the same file data, so creating one does not change the actual size of the file content.

BModify timestamp

The modify timestamp (`mtime`) is updated only when the content of the file changes, not when a hard link is created; however, the change timestamp (`ctime`) would be updated due to metadata alteration.

CLink countCorrect

Creating a hard link increments the link count (or reference count) stored within the file's inode because another directory entry now points to the same underlying data.

DInode number

Hard links share the same inode number, as they all point to the identical data on the disk; creating a new hard link does not change the inode number itself.

EPermissions

Permissions are stored in the inode and are shared by all hard links to that inode; creating a new hard link does not alter the existing permissions of the file.

Concept tested: Hard links and file metadata

Source: https://linux.die.net/man/1/ln

Topics

#Hard links#Inode#Link count#File metadata

Community Discussion

No community discussion yet for this question.

Full LFCS Practice