READLINK(3) 1 READLINK(3)readlink - Returns the target of a symbolic linkSYNOPSIS
string readlink (string $path)
DESCRIPTION readlink(3) does the same as the readlink C function.
PARAMETERS
o $path
- The symbolic link path.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.3.0 | |
| | |
| | This function is now available on Windows plat- |
| | forms (Vista, Server 2008 or greater). |
| | |
+--------+---------------------------------------------------+
RETURN VALUES
Returns the contents of the symbolic link path or FALSE on error.
EXAMPLES
Example #1
readlink(3) example
<?php
// output e.g. /boot/vmlinux-2.4.20-xfs
echo readlink('/vmlinuz');
?>
SEE ALSO is_link(3), symlink(3), linkinfo(3).
PHP Documentation Group READLINK(3)
Check Out this Related Man Page
IS_LINK(3) 1 IS_LINK(3)is_link - Tells whether the filename is a symbolic linkSYNOPSIS
bool is_link (string $filename)
DESCRIPTION
Tells whether the given file is a symbolic link.
PARAMETERS
o $filename
- Path to the file.
RETURN VALUES
Returns TRUE if the filename exists and is a symbolic link, FALSE otherwise.
EXAMPLES
Example #1
Create and confirm if a file is a symbolic link
<?php
$link = 'uploads';
if (is_link($link)) {
echo(readlink($link));
} else {
symlink('uploads.php', $link);
}
?>
ERRORS /EXCEPTIONS
Upon failure, an E_WARNING is emitted.
NOTES
Note
The results of this function are cached. See clearstatcache(3) for more details.
Tip
As of PHP 5.0.0, this function can also be used with some URL wrappers. Refer to "Supported Protocols and Wrappers" to determine
which wrappers support stat(3) family of functionality.
SEE ALSO is_dir(3), is_file(3), readlink(3).
PHP Documentation Group IS_LINK(3)
hi all,
I am trying to ftp and get some symbolic link file as it is instead of getting whatever it is pointing at. Is it do-able?
Thx in advance. (11 Replies)
Hi all,
This is my first message in this forum.
I'd like to know if there is a nice way to get the complete path from a symbolic link.
Example:
When I do a ls -ltr I see this output.
lrwxr-xr-x 1 mmmm users 66 Sep 4 09:58 LINK_SEND ->... (4 Replies)
Hey,
How can one ZIP the target of a soft/symbolic link in unix (if dodag@ is a symbolic link for the path car/reno/*.*, how can I zip car/reno/*.*, with using only dodag as my reference)?
Thxnk you. (1 Reply)
path = /first/second/third/fourth. i want to extract /first/second/third from path.my program something like this ....
path=/first/second/third/fourth
noc=`echo $path|tr '/' '\n'|wc -w`
var='echo $noc|cut -d'/' -f 1-$noc --> is giving error.
why $noc is not working here.any other... (3 Replies)
Have a random question:
In simple terms I have a find command on a dir:
/path/user/data/
/path/user is a link to:
/tmp/storage/
The find command outputs the files it finds as:
/path/user/data/file
What I need is:
/tmp/storage/file
Is there a way to "resolve" the Unix... (5 Replies)
Hiii...
I wanna know "What are the contents of a symbolic link?".......
From google I dint get a good answer....that's why I posts here......
Thanking you.
Krishna (1 Reply)
Hi,
I am using readlink command in Linux . Is there a equilent command for AIX?
ORACLE_HOME=`readlink -f /opt/oracle/oracle_home`
Thanks in advance. (1 Reply)
Hi, I cannot uncompress it using standard command:
od -A d -t x1 vmlinuz | grep '1f 8b 08 00'
dd if=vmlinuz bs=1 skip=24584 | zcat > vmlinux
> gzip: stdin: not in gzip format(of course 24584 is output from 1st command + 8)
I try to do it with:
vmlinuz-2.6.32-131.4.1.el6.x86_64... (2 Replies)
Hello,
can someone please suggest or is it possible to hide the path for the link from viewing it from remote users.
for examples.
as root user login
#ls -l
lrwxrwxrwx 1 root root 43 Oct 2 16:05 sftpdata -> /data/sftphome/sftpuser1/sftpdata/
#pwd
/home/user1
#
when user1 logs... (4 Replies)
Hello all,
On a Solaris box, I am trying to move the target of a symbolic link.
Let's say the symbolic link looks like the following:
/dir1/dir2/link -> /some/dir/target
I would like to know of a simple way to move the target of the symbolic link and not the link itself. I'd like to move... (4 Replies)