Skip to content
Advertisement

Tag: hardlink

hard links refererring to a file ant stat st_nlink don’t match

Using Ubuntu 18.04 bash, if I list all files that share the same specific inode 4 with: I can see different values of the number of hard link for that same specific inode (=4). The same occur if I do it with C code. For other inodes I get the correct identical hard links values. What is the problem with

What really happens when deleting file [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question

How to create hard link in Linux from a C program

We know we can create hard link in Linux using ln file1 file2 which will make file2 a hard link of file1. However when I try to do this by using a C program, I face issues. Below is the C code. After compiling this program with gcc I run it as below. Here file1 exists and file2 is the

Advertisement