Softlinks atime and mtime modification

Is it possible to change the symbolic link atimeand mtime?

I am trying to change it using a function utime()(C code), but instead it changes the file assignment time.

Also if i do

cp -dpr <src fldr> <<dest folder> (command line) 

[The src folder contains various symbolic links.] Symbolic links at the destination are created with the current timestamp.

Executing stat()on a symlink will give me time for the destination file (in C code), but if we run the command staton the command line, it gives the timestamp of the link (maybe it uses lstat)

Any ideas?

+3
source share
2 answers

touch -h bash, mtime atime , :

touch -h somesymlink

-t, , .

+3

All Articles