first commit
This commit is contained in:
15
user/ln.c
Normal file
15
user/ln.c
Normal file
@ -0,0 +1,15 @@
|
||||
#include "kernel/types.h"
|
||||
#include "kernel/stat.h"
|
||||
#include "user/user.h"
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
if(argc != 3){
|
||||
fprintf(2, "Usage: ln old new\n");
|
||||
exit(1);
|
||||
}
|
||||
if(link(argv[1], argv[2]) < 0)
|
||||
fprintf(2, "link %s %s: failed\n", argv[1], argv[2]);
|
||||
exit(0);
|
||||
}
|
||||
Reference in New Issue
Block a user