blob: 0626779f50c5dfd6d976fbe05291a617389bf777 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/usr/bin/perl
#ident "$Id$"
#
# Print the time (possibly the mtime of a file) as a hexadecimal integer
#
($file) = @ARGV;
if ( defined($file) ) {
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,
$ctime,$blksize,$blocks) = stat($file);
$now = $mtime;
} else {
$now = time;
}
printf "0x%08x\n", $now;
|