58.2k views
4 votes
A user creates a link to a file file1 using the following command "ln file1 file2". Which of the following is not true?

1) file1 and file2 have the same inode numbers
2) The number of links for file1 is displayed as 1
3) The number of links for file1 is displayed as 2
4) Cannot be fixed

1 Answer

0 votes

Final answer:

The number of links for file1 is displayed as 2. When a user creates a link using the 'ln' command, the created link and the original file will have the same inode number.

Step-by-step explanation:

The correct answer is option 3) The number of links for file1 is displayed as 2.

When the user creates a link using the command 'ln file1 file2', file1 and file2 will have the same inode numbers because they point to the same file on the file system. However, the number of links for file1 will be displayed as 1, not 2.

This can be verified by using the 'ls -l' command to view the details of the files. The 'ls -l' command will display the file's permissions, owner, group, file size, last modified date, and the number of links.

User Ahmed Waheed
by
8.9k points