Re: How to find what symlink points to?

2009-07-27 Thread Mel Flynn
On Monday 27 July 2009 20:54:51 Unga wrote: > Thanks everybody for valuable replies. In fact, I also used readlink(2) but > fed the symlink path directly from dirent, which was partial, readlink(2) > requires full path. Nope it doesn't. It's the classical "opendir does not chdir" problem. readli

Re: How to find what symlink points to?

2009-07-27 Thread Unga
--- On Tue, 7/28/09, Mel Flynn wrote: > From: Mel Flynn > Subject: Re: How to find what symlink points to? > To: freebsd-questions@freebsd.org > Date: Tuesday, July 28, 2009, 1:25 AM > On Monday 27 July 2009 05:45:13 Unga > wrote: > > > > > Hi all >

Re: How to find what symlink points to?

2009-07-27 Thread Mel Flynn
On Monday 27 July 2009 05:45:13 Unga wrote: > > > Hi all > > > > > > I need to remove some unwanted symlinks on /dev using > > > > a C program. > > > > > The "struct dirent" only shows the symlink name, how > > > > do I find what that > > > > > symlink points to for verification purpose? > > > > B

Re: How to find what symlink points to?

2009-07-27 Thread Andrew Gould
On Mon, Jul 27, 2009 at 8:45 AM, Unga wrote: > > --- On Mon, 7/27/09, Erik Trulsson wrote: > >> From: Erik Trulsson >> Subject: Re: How to find what symlink points to? >> To: "Unga" >> Cc: freebsd-questions@freebsd.org >> Date: Monday, July 2

Re: How to find what symlink points to?

2009-07-27 Thread Unga
--- On Mon, 7/27/09, Erik Trulsson wrote: > From: Erik Trulsson > Subject: Re: How to find what symlink points to? > To: "Unga" > Cc: freebsd-questions@freebsd.org > Date: Monday, July 27, 2009, 9:36 PM > On Mon, Jul 27, 2009 at 05:44:59AM > -0700, Unga wrote:

Re: How to find what symlink points to?

2009-07-27 Thread Erik Trulsson
On Mon, Jul 27, 2009 at 05:44:59AM -0700, Unga wrote: > > Hi all > > I need to remove some unwanted symlinks on /dev using a C program. > > The "struct dirent" only shows the symlink name, how do I find what that > symlink points to for verification purpose? By using the readlink(2) system call