Unix and Linux Discussions Tagged with link |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
1 |
10,818 |
What is on Your Mind? |
|
|
|
3 |
3,111 |
UNIX for Beginners Questions & Answers |
|
|
|
6 |
18,292 |
Solaris |
|
|
|
5 |
5,689 |
Solaris |
|
|
|
0 |
3,604 |
Shell Programming and Scripting |
|
|
|
10 |
6,796 |
Solaris |
|
|
|
1 |
2,967 |
Solaris |
|
|
|
0 |
7,299 |
Open Source |
|
|
|
2 |
7,702 |
HP-UX |
|
|
|
0 |
2,721 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
5,386 |
UNIX for Dummies Questions & Answers |
|
|
|
12 |
4,647 |
Shell Programming and Scripting |
|
|
|
8 |
18,964 |
Shell Programming and Scripting |
|
|
|
4 |
3,899 |
Shell Programming and Scripting |
|
|
|
6 |
7,224 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
13,877 |
UNIX for Advanced & Expert Users |
|
|
|
0 |
3,602 |
High Performance Computing |
|
|
|
0 |
1,260 |
Software Releases - RSS News |
|
|
|
0 |
901 |
Software Releases - RSS News |
|
|
|
0 |
1,922 |
Solaris BigAdmin RSS |
|
|
|
2 |
7,208 |
Filesystems, Disks and Memory |
|
|
|
0 |
1,239 |
Software Releases - RSS News |
|
|
|
3 |
2,592 |
UNIX for Advanced & Expert Users |
|
|
|
0 |
1,788 |
Complex Event Processing RSS News |
|
|
|
2 |
10,684 |
Web Development |
|
|
|
0 |
1,140 |
Software Releases - RSS News |
|
|
|
0 |
2,327 |
OS X Support RSS |
|
|
|
1 |
3,616 |
IP Networking |
|
|
|
0 |
1,057 |
Software Releases - RSS News |
|
|
|
2 |
2,452 |
UNIX for Advanced & Expert Users |
|
|
|
4 |
4,445 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
3,358 |
BSD |
|
|
|
4 |
2,233 |
Solaris |
|
|
|
0 |
1,041 |
Software Releases - RSS News |
|
|
|
1 |
3,337 |
OS X (Apple) |
|
|
|
0 |
4,731 |
Solaris BigAdmin RSS |
|
|
|
5 |
372,045 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
4,773 |
Linux |
|
|
|
0 |
961 |
Software Releases - RSS News |
|
|
|
6 |
8,346 |
Programming |
LINK(3) 1 LINK(3)
link - Create a hard link
SYNOPSIS
bool link (string $target, string $link)
DESCRIPTION
link(3) creates a hard link.
PARAMETERS
o $target
- Target of the link.
o $link
- The link name.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.3.0 | |
| | |
| | This function is now available on Windows plat- |
| | forms (Vista, Server 2008 or greater). |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
Creating a simple hard link
<?php
$target = 'source.ext'; // This is the file that already exists
$link = 'newfile.ext'; // This the filename that you want to link it to
link($target, $link);
?>
NOTES
Note
This function will not work on remote files as the file to be examined must be accessible via the server's filesystem.
Note
For Windows only: This function requires PHP to run in an elevated mode or with the UAC disabled.
SEE ALSO
symlink(3), readlink(3), linkinfo(3).
PHP Documentation Group LINK(3)