link - make a link to an existing file
function link (name1, name2)
character*(*) name1, name2
integer function symlnk (name1, name2)
character*(*) name1, name2
Name1 must be the pathname of an existing file. Name2 is a pathname to be linked to file name1. Name2 must not already exist. The
returned value will be 0 if successful; a system error code otherwise.
Symlnk creates a symbolic link to name1.
SEE ALSO link(2), symlink(2), perror(3F), unlink(3F)BUGS
Pathnames can be no longer than MAXPATHLEN as defined in <sys/param.h>.
4.2 Berkeley Distribution May 15, 1985 LINK(3F)
Check Out this Related Man Page
LINK(2) System Calls Manual LINK(2)NAME
link - make a hard link to a file
int link(const char *name1, const char *name2)
A hard link to name1 is created; the link has the name name2. Name1 must exist.
With hard links, both name1 and name2 must be in the same file system. Name1 must not be a directory. Both the old and the new link share
equal access and rights to the underlying object.
Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and errno is set to indicate the error.
Link will fail and no link will be created if one or more of the following are true:
[ENOTDIR] A component of either path prefix is not a directory.
[ENAMETOOLONG] A path name exceeds PATH_MAX characters.
[ENOENT] A component of either path prefix does not exist.
[EACCES] A component of either path prefix denies search permission.
[EACCES] The requested link requires writing in a directory with a mode that denies write permission.
[ELOOP] Too many symbolic links were encountered in translating one of the pathnames. (Minix-vmd)
[ENOENT] The file named by name1 does not exist.
[EEXIST] The link named by name2 does exist.
[EPERM] The file named by name1 is a directory and the effective user ID is not super-user.
[EXDEV] The link named by name2 and the file named by name1 are on different file systems.
[ENOSPC] The directory in which the entry for the new link is being placed cannot be extended because there is no space left on the
file system containing the directory.
[EIO] An I/O error occurred while reading from or writing to the file system to make the directory entry.
[EROFS] The requested link requires writing in a directory on a read-only file system.
[EFAULT] One of the pathnames specified is outside the process's allocated address space.
SEE ALSO symlink(2), unlink(2).
4th Berkeley Distribution August 26, 1985 LINK(2)
I wouldn't say I'm a unix dummy, or a unix expert, but I have few other options. So I installed MkLinux on an old powermac 6100 I had around. I got it up and running too, its on my network, its apache web server works (though I need to install PHP) I downloaded the RC5-72 client and it runs great.... (25 Replies)
First off I try to install XTheater on SuSE 9.2 Pro I run the ./configure command and this is what I get
loading cache ./config.cache
checking for a BSD compatible install... (cached) /usr/bin/install -c
checking whether build environment is... (25 Replies)
Hi Can any one help me remove the unwanted data? I would want to remove the complete event id 4910 ( the type there is INFO), that means, I have to remove starting from 7th - 19th lines. can any one of you please help?
Thanks, (24 Replies)
Greetings, :rolleyes: :o :confused:
I am working on Solaris 8. I have a few questions:
1. How do I determine if I have the CC compiler? I know it isn't in my $PATH, so how do I find it?
2. How do you install wget? I have read the INSTALL file, but I am not familar with the switches,... (25 Replies)
Ultra E150 Solaris 2.5.1 Oracle server. was working fine, then started losing network connection. I can see in messages file that it was complaining about another device using its ip address. Though not any longer, though I wonder if that was a red herring. My IT guys have now re-reserved its ip... (29 Replies)
Hi guys, i am new to perl. I started reading the perl documents and try to come up with some logic.
I am trying to create a script that would go into a location, search for todays files, then searches for all .txt files from today.
If todays not found, its an error
If file size is less... (26 Replies)
This is the source code:
using namespace std;
struct passwd *user;
char login="alex", password="qwertyuiop";
if ((user= getpwnam(login)) == NULL)
cout << "No such user\n";
else if... (24 Replies)
Hi everyone. I would like to hook a system function (gettimeofday) to modify it. I guess I'll need kernel mode to do that. By the way, how could I do it (c++ or c)?
I want to modify that function for one process which I know the PID. So I need to return my own value for that PID and real value... (29 Replies)
Incompatiblity of the code due to CC compiler version mismatch.
I have a machine with
Machine A-- Operating System:SunOs 5.8 Generic_117350-45 sun4u sparc SUNW,Ultra-80(solaris 5.8)
CC Compiler:CC: WorkShop Compilers 4.2 16 Jun 1998 C++ 4.2 patch 104631-07
we have compiled C++... (36 Replies)
Hello, I am trying to concatenate two strings by merging the overlapped region. E.g.
Seq_merged=ACGTGCCCCCGTGTGTGTFunction strcat(char *dest, char *src) appends the src string to the dest string, ignoring the overlapped parts (prefix of src and suffix of dest).... (30 Replies)