Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

readlink(3) [php man page]

READLINK(3)								 1							       READLINK(3)

readlink - Returns the target of a symbolic link

SYNOPSIS
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 link

SYNOPSIS
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)
Man Page

14 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

get symbolic link file

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)
Discussion started by: andrec
11 Replies

2. Shell Programming and Scripting

Symbolic Links - BASH Script

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)
Discussion started by: rodrimuino
4 Replies

3. UNIX for Dummies Questions & Answers

ZIP a soft / symbolic link target

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)
Discussion started by: galz
1 Replies

4. Shell Programming and Scripting

how to extract last occurence of the field

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)
Discussion started by: kcp_pavan
3 Replies

5. UNIX for Dummies Questions & Answers

find - link - error

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)
Discussion started by: Cranie
5 Replies

6. UNIX for Dummies Questions & Answers

What are the contents of a symbolic link?

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)
Discussion started by: krishnampkkm
1 Replies

7. Shell Programming and Scripting

using server's symbolic link by client

Hi, is there any way to overcome an using of a server's symbolic link by a client ? Thank you for idea (1 Reply)
Discussion started by: perseus
1 Replies

8. Shell Programming and Scripting

readlink command

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)
Discussion started by: talashil
1 Replies

9. Red Hat

[RHEL6]Uncompress vmlinuz to vmlinux

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)
Discussion started by: Chrisdot
2 Replies

10. Shell Programming and Scripting

what's wrong with my match pattern

# ] && echo "ok" # ls /boot/vmlinuz-2.6.32-279.el6.x86_64 /boot/vmlinuz-2.6.32-279.el6.x86_64 it doesn't return ok , any one help? (5 Replies)
Discussion started by: yanglei_fage
5 Replies

11. Red Hat

how to hide the path users on the symlink.

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)
Discussion started by: bobby320
4 Replies

12. Shell Programming and Scripting

How to list all symbolic link?

how to list all symbolic link can i use find / path -type l (1 Reply)
Discussion started by: avtalan
1 Replies

13. How to Post in the The UNIX and Linux Forums

How to list all symbolic link?

how to list all symbolic link, can i use find / path -type l (2 Replies)
Discussion started by: avtalan
2 Replies

14. Shell Programming and Scripting

Moving the target of a symbolic link

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)
Discussion started by: ejianu
4 Replies