Q: find command does not follow symbolic links unless you specify -follow ?

Q: find command does not follow symbolic links unless you specify -follow ?

Post by The man from the great white nor » Sat, 30 May 1998 04:00:00



I stumbled on this quirk on solaris. Under Digital UNIX, the find
command automatically follows symbolic links.  Is there other "tricks"
related to symlinks on solaris that do not behave like Digital Unix ?

TIA

NOTE: To reply via e-mail, remove the 'anti-spam-' from my e-mail adress

 
 
 

Q: find command does not follow symbolic links unless you specify -follow ?

Post by Casper H.S. Dik - Network Security Engine » Sat, 30 May 1998 04:00:00


[[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]


Quote:>I stumbled on this quirk on solaris. Under Digital UNIX, the find
>command automatically follows symbolic links.  Is there other "tricks"
>related to symlinks on solaris that do not behave like Digital Unix ?

So it spins in a loop?

Well, it's hard to say, but off hand (not sure if DU is different);

    - chown follows symlinks (unless -h is specified) and it will
      not recursively descend into symlinks.
    - chown(2) also follows symlinks; lchown() chowns symlinks.

This is different from BSD unix where chown() never follows symlinks.

Casper
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

 
 
 

Q: find command does not follow symbolic links unless you specify -follow ?

Post by Peter Ben » Sat, 30 May 1998 04:00:00





>>I stumbled on this quirk on solaris. Under Digital UNIX, the find
>>command automatically follows symbolic links.  Is there other "tricks"
>>related to symlinks on solaris that do not behave like Digital Unix ?

>So it spins in a loop?

The original poster must be mistaken - DU's find does not follow
symlinks. It could be that he is acutally using GNU find - the test
the configure script uses to see if you are on a system with stat or
lstat is broken and it erroneously configures find not to use lstat.

Peter

 
 
 

Q: find command does not follow symbolic links unless you specify -follow ?

Post by Griff Miller I » Sun, 31 May 1998 04:00:00



Quote:

> I stumbled on this quirk on solaris. Under Digital UNIX, the find
> command automatically follows symbolic links.  Is there other "tricks"
> related to symlinks on solaris that do not behave like Digital Unix ?

There is the -follow switch to the find command:

     -follow        Always true; causes symbolic links to be fol-
                    lowed.   When  following symbolic links, find
                    keeps track of  the  directories  visited  so
                    that  it can detect infinite loops; for exam-
                    ple, such a loop would occur  if  a  symbolic
                    link pointed to an ancestor.  This expression
                    should not be used with the -type  l  expres-
                    sion.

--
Griff Miller II
Senior Unix Sysadmin
PGS Tensor

 
 
 

Q: find command does not follow symbolic links unless you specify -follow ?

Post by Griff Miller I » Sun, 31 May 1998 04:00:00




> > I stumbled on this quirk on solaris. Under Digital UNIX, the find
> > command automatically follows symbolic links.  Is there other "tricks"
> > related to symlinks on solaris that do not behave like Digital Unix ?

> There is the -follow switch to the find command:

>      -follow        Always true; causes symbolic links to be fol-
>                     lowed.   When  following symbolic links, find
>                     keeps track of  the  directories  visited  so
>                     that  it can detect infinite loops; for exam-
>                     ple, such a loop would occur  if  a  symbolic
>                     link pointed to an ancestor.  This expression
>                     should not be used with the -type  l  expres-
>                     sion.

Oops, never mind - I didn't see the full Subject: of your post until
after I sent.  :^}

--
Griff Miller II
Senior Unix Sysadmin
PGS Tensor

 
 
 

Q: find command does not follow symbolic links unless you specify -follow ?

Post by Michael Wa » Sun, 31 May 1998 04:00:00




Quote:>    - chown follows symlinks (unless -h is specified) and it will
>      not recursively descend into symlinks.
>    - chown(2) also follows symlinks; lchown() chowns symlinks.

You can NOT make "touch" NOT to following symlinks.
 
 
 

Q: find command does not follow symbolic links unless you specify -follow ?

Post by Casper H.S. Dik - Network Security Engine » Mon, 01 Jun 1998 04:00:00


[[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]


>You can NOT make "touch" NOT to following symlinks.

Touch has no meaning on symlinks; (sym,links cannot be modified; therefor
changing the last mod time is meaningless)

Can you do this in otehr unxies?  What does utimes() do?
There's no lutimes() that I've heard off.

Casper

--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

 
 
 

Q: find command does not follow symbolic links unless you specify -follow ?

Post by Chris Thomps » Thu, 04 Jun 1998 04:00:00




>[[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]


>>You can NOT make "touch" NOT to following symlinks.

>Touch has no meaning on symlinks; (sym,links cannot be modified; therefor
>changing the last mod time is meaningless)

Well, in some filing systems [e.g. Solaris 2 ufs] readlink(2), including the
implicit one in open(2), updates the atime. And of course lchown(2) updates
the ctime. I suppose it's the missing writelink(2) which would update mtime. :-)

Quote:>Can you do this in otehr unxies?  What does utimes() do?
>There's no lutimes() that I've heard off.

>Casper

Chris Thompson

 
 
 

1. Find command - follow symbolic links under AIX

Under SCO and Sun Solaris, you can tell the "find" command to follow
symbolic links using the "-follow" option. So, for example, find . -name
"whatever.dat" -follow -print ... will search the current directory
structure, and follow all symbolic links, for the file "whatever.dat".

The same command line under AIX 3.2.5 yields an error - it tells me
"-follow" is a bad option. And by default, the find command will NOT follow
a symbolic link.

So, my question is: does anyone know of how I can achieve the equivalent
result under AIX using "find" i.e. tell it to follow symbolic links? Perhaps
there is another option I have missed that can do the job. I do NOT want to
write separate find commands for each symbolic link in the directory
structure!

Regards,
Meyer.

[Please cc: any response directly to my email address.]

2. TB Maui WaveTable support!?

3. find: cannot follow symbolic link sym-link

4. semaphores

5. How to make "find" follow symbolic links ???

6. gated & OSPF

7. apache does not follow symbolic link above /home/httpd/html?

8. AnswerBook problem

9. cpio Can't Follow Symbolic Links?

10. NCSA 142, Solaris, 'will not follow link' on non-link

11. How to trick the csh(1) to follow a symbolic link?

12. FollowSymLinks set, but still wont follow symbolic links

13. tar and following symbolic links