what is a symlink linked to?

T

Tim Hunter

Is there a method that, given a symlink, returns what the symlink is
linked to? Obviously ls(1) has this information, and stat(1), but I'm
not seeing a way to get it in Ruby.
 
S

Sam Roberts

Quoteing (e-mail address removed), on Mon, Jun 30, 2003 at 10:18:10PM +0900:
Is there a method that, given a symlink, returns what the symlink is
linked to? Obviously ls(1) has this information, and stat(1), but I'm

There is a stat utility?

readlink(2) give this info.
not seeing a way to get it in Ruby.

$ ri File.readlink
--------------------------------------------------------- File::readlink
File.readlink( fileName ) -> fileName
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top