Article View: comp.unix.shell
Article #388Re: Time-stamping files
From: Janis Papanagnou
Date: Mon, 16 Nov 2026 15:28
Date: Mon, 16 Nov 2026 15:28
56 lines
2898 bytes
2898 bytes
On 2026-11-16 14:44, Geoff Clare wrote: > Janis Papanagnou wrote: > >> What I lazily did was, say, touch name*.pdf but while the shell's >> file expansion lists sequentially name1.pdf name2.pdf ... name8.pdf >> the 'touch' command seems to _operate_ arguments in *reverse* order. > > Which version of touch? $ whence touch /usr/bin/touch $ touch --version touch (GNU coreutils) 9.4 ... > > POSIX requires that touch processes the files in the order they are > given. (XCU 1.4 Utility Description Defaults, under "OPERANDS": > "Unless otherwise stated, the standard utilities that accept operands > shall process those operands in the order specified in the command > line." The OPERANDS section for touch does not state otherwise.) Thanks. > > Running GNU touch from coreutils 9.1 under strace on Linux shows it > processes the files in the correct order... > > [...] > > If your version of touch really is processing them in reverse, you > should report it as a bug. Just noticed it's even worse than that. Incidentally I was able to cross the resolution boundary (which seems to be 8 ns on my system) by a single touch command which was $ touch 6 7 8 9 and the 'stat' command for these four files shows 2026-11-16 16:13:47.212143070 +0100 7 2026-11-16 16:13:47.212143070 +0100 8 2026-11-16 16:13:47.212143070 +0100 9 2026-11-16 16:13:47.211143078 +0100 6 <<< ...78 ns $ ls -ltr 6 7 8 9 -rw-rw-r-- 1 xyz xyz 0 Nov 16 16:13 6 -rw-rw-r-- 1 xyz xyz 0 Nov 16 16:13 9 -rw-rw-r-- 1 xyz xyz 0 Nov 16 16:13 8 -rw-rw-r-- 1 xyz xyz 0 Nov 16 16:13 7 Janis
Technical Details
Message-ID:
<11df7ef$34tb9$2@dont-email.me>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<11d957u$1fnqs$1@dont-email.me> <iudrsm-bcg.ln1@ID-313840.user.individual.net>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: Janis Papanagnou <janis_papanagnou+ng@hotmail.com> Newsgroups: comp.unix.shell Subject: Re: Time-stamping files Date: Mon, 16 Nov 2026 16:28:15 +0100 Organization: A noiseless patient Spider Lines: 56 Message-ID: <11df7ef$34tb9$2@dont-email.me> References: <11d957u$1fnqs$1@dont-email.me> <iudrsm-bcg.ln1@ID-313840.user.individual.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 16 Nov 2026 15:28:16 +0000 (UTC) Injection-Info: dont-email.me; logging-data="3306857"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18JuHiPO9gxPjm7u38R2rnK"; posting-host="e7e11f5f9ce272072a353d98be4103de" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:mCo93ofglZNs2r35j/KJ6vR0sU8= sha256:7UvMhgNr43Qi9v+FN3qVmOKt9WDMfVSM8J/aubsJASM= sha1:2SYCDsDeezMxkH+oEpof2EUagnM= sha256:eD6/7C+2Luk5Tcz+IUX65X+GloBNGB4TXa7twvRnldc= In-Reply-To: <iudrsm-bcg.ln1@ID-313840.user.individual.net> Content-Language: en-US