Skip to content

Instantly share code, notes, and snippets.

Created November 4, 2011 18:16
Show Gist options
  • Save anonymous/1340064 to your computer and use it in GitHub Desktop.
Save anonymous/1340064 to your computer and use it in GitHub Desktop.
#include <unistd.h>
#include <stdio.h>
int main(int argc, char* argv[]) {
if (argc != 3) {
fprintf(stderr,"Use: hlink <src_dir> <target_dir>\n");
return 1;
}
int ret = link(argv[1],argv[2]);
if (ret != 0)
perror("link");
return ret;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment