From: nobu.nokada@... Date: 2002-01-31T01:01:11+09:00 Subject: Re: trouble changing mtime on symlinks Hi, At Thu, 31 Jan 2002 00:03:59 +0900, Simon Strandgaard <0bz63fz3m1qt3001@sneakemail.com> wrote: > I want to sync the timestamp of the symlink with the original file, they > has to be exact. There is unfortunatly no File.lutime is there some other > way around it in ruby? If your system has lutime(2), you can use Kernel#syscall. class File SYS_lutime = # see /usr/include/sys/syscall.h or somewhere. def lutime(atime, mtime, *files) t = [atime.to_i, mtime.to_i].pack("ll") files.each do |f| syscall(SYS_lutime, f, t) end.size end end You may get SYS_lutime value with this. $ {echo '#include ';echo SYS_utime;}|gcc -E -|tail -1 -- Nobu Nakada