Advertisement
AntonioVillanueva

Enlace simbolico en C tipo ln -s objetivo simbolico

Oct 4th, 2022
805
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.32 KB | None | 0 0
  1. //Creacion de un link simbolico en C , ln -s real[1] simbolico[2]
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. #include <unistd.h>
  5.  
  6. int main(int argc, char* argv[])
  7. {
  8.     //argv[1] real , arv[2] simbolico
  9.     int sl = symlink(argv[1], argv[2]);
  10.     if (sl == 0) {printf("OK  %s --> %s ",argv[2],argv[1]);}
  11.     return 0;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement