{"id":9197,"date":"2017-11-15T15:59:21","date_gmt":"2017-11-15T14:59:21","guid":{"rendered":"http:\/\/www.b.shuttle.de\/hayek\/hayek\/jochen\/wp\/blog-en\/?p=9197"},"modified":"2017-11-15T15:59:21","modified_gmt":"2017-11-15T14:59:21","slug":"extract-timestamp-from-a-gzip-file","status":"publish","type":"post","link":"https:\/\/wp.jochen.hayek.name\/blog-en\/2017\/11\/15\/extract-timestamp-from-a-gzip-file\/","title":{"rendered":"extract timestamp from a gzip file"},"content":{"rendered":"<ul>\n<li><a href=\"https:\/\/unix.stackexchange.com\/questions\/79543\/extract-timestamp-from-a-gzip-file\/79546\">https:\/\/unix.stackexchange.com\/questions\/79543\/extract-timestamp-from-a-gzip-file\/79546<\/a><\/li>\n<li><a href=\"http:\/\/www.forensicswiki.org\/wiki\/Gzip\">http:\/\/www.forensicswiki.org\/wiki\/Gzip<\/a><\/li>\n<\/ul>\n<p>Try this:<\/p>\n<pre>$ &lt;foo.gz dd bs=4 skip=1 count=1 | od -t d4\n0000000 <span style=\"text-decoration: underline\">1036139973<\/span>\n0000004\n\n# with extended versions of <em>dd<\/em> resp. <em>od<\/em>:\n\n$ &lt;foo.gz dd bs=4 skip=1 count=1 status=none | od ---format=d4 --address-radix=n\n<span style=\"text-decoration: underline\">1036139973<\/span>\n\n<\/pre>\n<ul>\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/Unix_epoch\">https:\/\/en.wikipedia.org\/wiki\/Unix_epoch<\/a>\u00a0\u2013 this is what the given command line shows you (actually with offsets around)<\/li>\n<\/ul>\n<p>How to display a human readable time stamp from the one extracted?<\/p>\n<ul>\n<li><a href=\"http:\/\/Jochen.Hayek.name\/wp\/blog-en\/2017\/10\/26\/how-to-translate-human-readable-time-to-epoch\/\">http:\/\/Jochen.Hayek.name\/wp\/blog-en\/2017\/10\/26\/how-to-translate-human-readable-time-to-epoch\/<\/a>\u00a0\u2013\u00a0\u2026 and <span style=\"text-decoration: underline\">esp.<\/span> the other way round<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/unix.stackexchange.com\/questions\/79543\/extract-timestamp-from-a-gzip-file\/79546 http:\/\/www.forensicswiki.org\/wiki\/Gzip Try this: $ &lt;foo.gz dd bs=4 skip=1 count=1 | od -t d4 0000000 1036139973 0000004 # with extended versions of dd resp. od: $ &lt;foo.gz dd bs=4 skip=1 count=1 status=none | od &#8212;format=d4 &#8211;address-radix=n 1036139973 https:\/\/en.wikipedia.org\/wiki\/Unix_epoch\u00a0\u2013 this is what the given command line shows you (actually with offsets around) How to display a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_share_on_mastodon":"0"},"categories":[671],"tags":[1077,1349],"class_list":["post-9197","post","type-post","status-publish","format-standard","hentry","category-unix","tag-gzip","tag-timestamp"],"share_on_mastodon":{"url":"","error":""},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paO0kP-2ol","jetpack_likes_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts\/9197","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/comments?post=9197"}],"version-history":[{"count":0,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts\/9197\/revisions"}],"wp:attachment":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/media?parent=9197"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/categories?post=9197"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/tags?post=9197"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}