101-500 Exam QuestionsBrowse all questions from this exam

101-500 Exam - Question 8


Consider the following output from the command ls -i:

How would a new file named c.txt be created with the same inode number as a.txt (Inode 525385)?

Show Answer
Correct Answer: C

To create a new file that shares the same inode number as an existing file, a hard link must be created to the original file. The command for creating a hard link is 'ln <original_file> <new_file>'. In this case, 'ln a.txt c.txt' will create a hard link named c.txt that shares the inode number 525385 with a.txt, since it links directly to the same data on disk.

Discussion

7 comments
Sign in to comment
kleverOption: C
Oct 10, 2022

C is correct because only ln is used without any options creating a hardlink which has the same inode number as the original file

slacked4222Option: A
Nov 27, 2023

Gpt and bard says A

dpereiro4481
May 30, 2024

But says the wrong answer, -h is not valid argument for ln command. The true answer is C

mrfstopOption: C
Jan 24, 2024

Bard says C

1e3732dOption: C
Feb 26, 2024

ln <source> <link> creates hard links (symbolic require the -s parameter), which share the same inode as the source file.

hung456aOption: C
Mar 19, 2024

I tested in linux ubuntu Answer C is correct

dpereiro4481Option: C
May 30, 2024

-h is not valid argument for ln command. The true answer is C

prometeuOption: C
Jun 27, 2023

No one. For create b.txt with same inode must the command : "ln a.txt b.txt"