Tag: timestamp

  • extract timestamp from a gzip file

    https://unix.stackexchange.com/questions/79543/extract-timestamp-from-a-gzip-file/79546 http://www.forensicswiki.org/wiki/Gzip Try this: $ <foo.gz dd bs=4 skip=1 count=1 | od -t d4 0000000 1036139973 0000004 # with extended versions of dd resp. od: $ <foo.gz dd bs=4 skip=1 count=1 status=none | od —format=d4 –address-radix=n 1036139973 https://en.wikipedia.org/wiki/Unix_epoch – this is what the given command line shows you (actually with offsets around) How to display a…

  • how to translate human readable time to EPOCH (GNU coreutils (“date”), Perl, …) – resp. the other way round

    https://stackoverflow.com/questions/7357423/perl-human-readable-time-with-miliseconds-to-epoch https://www.gnu.org/software/coreutils/manual/html_node/Examples-of-date.html – making use of the ‘@’ feature of the date utility $ date –date=”2011/09/08 00:10:17.997″ +%s # from human readable time to EPOCH 1315433417 $ date –utc –date=”2011/09/08 00:10:17.997″ +%s 1315440617 $ date -d @946684800 +”%F %T %z” 2000-01-01 01:00:00 +0100 $ date –utc –date=’1970-01-01 946684800 seconds’ +”%Y-%m-%d %T %z” 2000-01-01 00:00:00 +0000