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

No members online now.

Forum statistics

Threads
474,434
Messages
2,571,685
Members
48,796
Latest member
Greg L.

Latest Threads

Top