Suppose you have file
file with a given
mtime. If I create a symlink
sym pointing to
ln -s the symlink itself gets a
mtime-stamp that corresponds to the time where the
symlink was created which is not the same as the
So is there a way to create a symlink such that it has the same
mtime as the file it is pointing to?
The background to this question is this script, where a directory of links to the n newest files of a cloud mirror is created. Now if I do for example
ls -lt in this
current directory, it doesn't show me the dates where the actual files were created but when the symlinks were created. But I want to see the files creation date.
Edit In my original post I erroneously asked for ctime (I changed it above), however the question should be about mtime. Thanks to @ilkkachu indicating this.