From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6AC23138334 for ; Fri, 31 Aug 2018 19:35:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 75431E0809; Fri, 31 Aug 2018 19:34:52 +0000 (UTC) Received: from sonic305-3.consmr.mail.bf2.yahoo.com (sonic305-3.consmr.mail.bf2.yahoo.com [74.6.133.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0559EE07E0 for ; Fri, 31 Aug 2018 19:34:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1535744091; bh=LkyKU6asP8kcSkjWNsEe9Zav9gPk2UW/pcIImMRr5kQ=; h=Subject:To:References:From:Date:In-Reply-To:From:Subject; b=U1G8DXATjJt8pvoAs1luLfBFWJFfGgh3eSwtMQ5wcjPRfoLQFbIY6A0Kse9gdXv9OlJ2VuxCVScFlHgKYPHMceJ0FhMmOErBImPZvKf/RigOEJo3CwKwMcWLmc9n4DYfNPJnF6u/xEiTGqIIPkuABLv75/bGK34j+V8IBjCjXuOEN5Lk0VcJuXnk34jgTWeraNKxeRn3RlU7ERp2i3PdI4dMftGsvujxbHV4blQWyw3yQBGm9uFHiBhuAZ9d+KB+o3UDb2VeqlSW7UTRVo/u3b7qYc8JU4ht4dWypFw865qwPSkAvVYRKFi7Cp3G18gctTfFtfEajtHrDrGKnJOYYQ== X-YMail-OSG: IftUO.AVM1k7yagPXPqrXrkQRdc_0n6w6kDe_zsyeQaYP8vTWlYch3rRbn46X.z 9dVuuj5XYP8WmDpuJsEd5Dh7g24OF.uJ0uZaqNOHEycwdqlM49pgReXiG9EVllZTQagmWqOOef8a hKrUAd5X87itCK6SAPU7IhI9sPmf5QqYC8Ymn.W6FogSxuLCm4jY049IWXzgYqhIXpaZkWm7N5_w SDGWx68wRxcArb5xEFx0Em6_wIH3i5Kc_TdD1ayelB1IzgLIVfXQYxWuSFqiQVQErkK2YXxrkMSj 4YjC9tKMELf.dwXj2LOKWowuiGRkstF1rQ7eiE4.G5w5nbUujaSo8TUD8GKKfHr8JLO4shPSIcKs CtfNUY5BauUvWpY7vFguDn23N9vYG90IlL9VWpLCfPhkq6RbbNMaRzLwNzbis4HWUzWyu4Ofpzkn UzVy3Sb.J7URHN0mej2fgTRHd1KL32fT.NnAGhSEiTTjLR0FQdIkW9niZqGH13rbcMgBM3L3Kg3S 2kDrDtSbKAyVaSxBuIHJ.zaQABMDZ9NNEvhtDioSBTq2xvOQmEe_W47R3sENfFS3elBlOoR04nd2 ThSx6gSE10RQvapHEpbQLhdac24HLk2zMM74.xec59Rh0YZhW3Tde_zpxTNXKLceRdLNdo2ySe0j NTGjLID.OcjtcMpSlO9kYCQqM17TIUAuE7U6arT_xmQytORVqH42pRknyzT1zhJUhv.l5em7FJJC TYyqWP.uGbVx4w4a_KY6Emb60sIaW8KUwSAgXXIogaOIxCOGk5K.Od05QxWgWDTK4aJ1dX4uVQnf 7AHS2nSKpnls6Q0M4LMvSWlp8msKI4uM4eyzcofeNC5GM1yNGn0lzxUcomoOzlK44X7j8KS4nOeQ I7mgFtz9d4twQvCJ0SohppNuXAtaOzGF9oa43Fda.Zfn8MJay17vVJi_AuLX0BLymMloGi5KhuLo KCS6uTbDxCvi8W0DVHnYgUbTi7UhuEhgrK9sAryCXnrbBZ9FHgIIaUvmcgFgTeKaS4V7lITlsdhw HHYVBVsV4ZcWgWw-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.bf2.yahoo.com with HTTP; Fri, 31 Aug 2018 19:34:51 +0000 Received: from 072-185-251-010.res.spectrum.com (EHLO [192.168.1.52]) ([72.185.251.10]) by smtp414.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 11880b672841ca950db8bc3fa5d8b0a1; Fri, 31 Aug 2018 19:34:47 +0000 (UTC) Subject: Re: [gentoo-user] [SOLVED] Cellphone VFAT datestamps versus linux datestamps To: gentoo-user@lists.gentoo.org References: <20180829023951.GB17522@waltdnes.org> <20180829082231.1f859b17@digimed.co.uk> <20180830004529.GA27664@waltdnes.org> From: james Openpgp: preference=signencrypt Message-ID: <5c2c37ec-4198-dbd9-2dc7-d7e6b7dfe83e@verizon.net> Date: Fri, 31 Aug 2018 15:34:46 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 In-Reply-To: <20180830004529.GA27664@waltdnes.org> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Archives-Salt: 0af6abe7-cf01-4c30-97c3-e7c9829c51e8 X-Archives-Hash: b8e903380f585931a128335a8628a20a On 8/29/18 8:45 PM, Walter Dnes wrote: > On Wed, Aug 29, 2018 at 08:22:31AM +0100, Neil Bothwick wrote >> On Tue, 28 Aug 2018 22:39:51 -0400, Walter Dnes wrote: >> >>> Given this info, I can cobble together a short script. A "for" loop >>> cycles through "*.jpg". Read "CreateDate" from the EXIF data, and feed >>> it into the "touch" command, which would reset the physical file >>> datestamp. >> >> You don't even need that, exiftool has a FileModifyDate tag, which is the >> filesystem date not an EXIF tag, so you can simply set FileModifyDate to >> CreateDate for each file. >> >> exiftool '-FileModifyDate > Cool; I wasn't aware of that. Definitely shorter than my version... > > #!/bin/bash > for filename in *.jpg > do > datestamp0=`exiftool -T -CreateDate ${filename} | sed "s/[ :]//g"` > datestamp="${datestamp0:0:12}.${datestamp0:12:2}" > touch -t ${datestamp} ${filename} > done > > I tried out your command on a few directories going back to April (I > got the phone in March) and it works fine. I have the directories > sorted by date, and the generated datestamps match the day. Also, the > hour:minute stamps monotonitcally rise with the image sequence numbers, > which is a good sign. > Here is a useful parallel thread that give syntax options too: https://discuss.pixls.us/t/date-stamp-exiftool-and-google-photos/8803 hth, James