Wie erstelle ich programmgesteuert einen Softlink in C/C++? Der Systemaufruf link() in Freebsd erstellt einen harten Link.
Wie erstelle ich programmgesteuert einen Softlink in C/C++?
Lesezeit: 1 Minute
14439500cookie-checkWie erstelle ich programmgesteuert einen Softlink in C/C++?
Professor_Chaos
Der gewünschte Systemaufruf ist Symlink(2).
#include <unistd.h>
int symlink(const char *name1, const char *name2);
Ein symbolischer Link
name2
erstellt wirdname1
-
Danke, das hilft 🙂
– Professor_Chaos
30. September 2014 um 10:11 Uhr
Du kannst anrufen symlink()
int symlink(const char *name1, const char *name2);
A symbolic link name2 is created to name1 (name2 is the name of the file
created, name1 is the string used in creating the symbolic link). Either
name may be an arbitrary path name; the files need not be on the same
file system.
-
Danke, das hilft. Neu in der Systemprogrammierung.
– Professor_Chaos
30. September 2014 um 10:13 Uhr
symlink
Funktion definiert inunistd.h
.– isedev
30. September 2014 um 9:59 Uhr