in reply to utime for symbolic links
But what you want is easy to implement using plain Perl functions: instead of touching the old symlink, create a new one and rename it over the old one:
#! /usr/bin/perl use strict; use warnings; use File::Touch qw{ touch }; sub show_stat { system qw( stat file link ); } unlink qw( file link new_link ); touch('file'); symlink 'file', 'link'; show_stat(); sleep 1; symlink 'file', 'new_link'; rename new_link => 'link'; show_stat();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: utime for symbolic links
by shamlin (Initiate) on Apr 15, 2020 at 15:19 UTC | |
by hippo (Archbishop) on Apr 15, 2020 at 15:34 UTC | |
by choroba (Cardinal) on Apr 15, 2020 at 15:44 UTC |