Skip to content
Advertisement

Tag: execvp

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