blob: d591be2aff366e6b418c5bca866852d1d13b79c0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
int main(int argc, char** argv)
{
if (argc != 3) {
fprintf(stderr, "usage: ln <old-path> <new-path>\n");
return 1;
}
int rc = link(argv[1], argv[2]);
if (rc < 0) {
perror("link");
return 1;
}
return 0;
}
|