Skip to content

Instantly share code, notes, and snippets.

@sumikawa
Created October 26, 2009 04:24
Show Gist options
  • Save sumikawa/218420 to your computer and use it in GitHub Desktop.
Save sumikawa/218420 to your computer and use it in GitHub Desktop.
#! /usr/local/bin/perl
use File::stat;
die "Usage: $0 from to\n" if ($#ARGV != 1);
my $from = shift @ARGV;
my $to = shift @ARGV;
my $stat = stat($from);
my $atime = $stat->atime;
my $mtime = $stat->mtime;
utime($atime, $mtime, $to);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment