How to use 'utime()' on symbolic link?

How to use 'utime()' on symbolic link?

Post by Po-Ting » Sat, 01 Aug 1998 04:00:00

I use 'utime()' func to update files' access time and the modification time.
It works on regular files. But for the 'symbolic link', it will apply the
modification on the file the symbolic link refer to.

Is there any way to ask 'utime()' modify the 'symbolic link' itself instead of the
real file if existed?

Commands 'chown' and 'chgrp' have option '-h' to do so. Is it possible to write
a replacement of 'utime()' simple?

Po-Ting Wu


1. Traversing symbolic links using 'find'

I'm using SunOS 4.1.3.

I like to use 'find' to look for files that interest me.  However, in
most modern SunOS-based networks, the auto-mounter is used
extensively, which results in lots of directories which are actually
symbolic links to other directories.  The 'find' command will not
traverse into these links, making it less useful nowadays than it used
to be.

Is there any version of 'find' out there which, through the use of
some new command line argument, perhaps, will allow me to optionally
traverse into directories which are symbolic links?

Please ... I do NOT (!!!) want a Perl script for this.  Thank you.

And thanks in advance for any other help I may get.


 JP Morgan & Co, Corporate Technology               212 235-5086
 >>>> DISCLAIMER:  The opinions expressed above are solely my own and do  <<<<
 >>>>              not necessarily represent the views of JP Morgan & Co. <<<<

2. Help with login scripts

3. don't allow utime()/utimes() on immutable/append-only files

4. rexec

5. Symbolic links in dirs with 't' bit ???

6. How to code shared libs in libs in linux?

7. 'make' and symbolic link problem: solved

8. need cd player

9. 'make' and symbolic link problem

10. Strange filesystem 'bug' with symbolic links

11. utime for symbolic links??

12. Where is 'utime' on VAX C?

13. Too many symbolic links, Symbolic link loop