Vincent Lefevre wrote: > There seems to be no way to change the timestamps of a symbolic link > with a shell command.
There may be no way to change the timestamps of a symbolic link with a compiled C program. :-) The operating system kernel supplies an interface to change the ownership of a symbolic link with lchown(2) but does not supply any interface to change the timestamp of a symbolic link (no lutime(2) or lutimes(2) exists) and therefore what you are asking for is not supported by the operating system kernel. The only way I know to do this on BSD like systems is to remove and recreate the symlink. In order to act upon the symlinks special kernel routines need to be added such as lstat(2) [as opposed to stat(2)] which act upon the symlink itself. Fortunately the owner, group, and mode of a symlink are completely irrelevant to a symlink. For what purpose would you want to change the timestamp of a symlink? > So, it would be nice if 'touch' had an option (e.g. -n / > --no-dereference) so that the changes occur on the symbolic link > itself (when the file is a symbolic link). Since this is not supported at the kernel level this can't be done. If additional system calls were made available to support lutime(2) and lutimes(2) then maybe. The timestamp, owner, group, of a symbolic link are completely insignificant and are cosmetic only. They show who made the link and that is all. They are not significant to the system behavior. When symbolic links were added to the BSD kernel they broke some of the existing filesystem model. But it was worth it. Symlinks are too useful to be without even if it does mean that inconsistencies were created by their presence. Prior to symlinks the filesystem model was simpler and things were more consistent. Bob -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

