GNU bug report logs - #27942
Bug regarding "touch" command

Previous Next

Package: coreutils;

Reported by: pavan kumar yalavarthi <yalavarthi.pavankumar.123 <at> gmail.com>

Date: Fri, 4 Aug 2017 06:26:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #34 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: L A Walsh <coreutils <at> tlinx.org>
Cc: bug-coreutils <at> gnu.org, yalavarthi.pavankumar.123 <at> gmail.com
Subject: Re: bug#27942: Bug regarding "touch" command
Date: Fri, 4 Aug 2017 09:17:50 -0700
L A Walsh wrote:
>> You run "touch -". Whatever file stdout happens to be associated with, gets 
>> touched. It's the same idea as "cat -", except with stdout rather than stdin.
>>
> 
> The difference between that and updating due to write activity being
> mostly that ctime is also written?

No, that's not a difference. Try running 'touch foo; strace touch foo; strace 
touch - >>foo'. I did that, and saw the same system call being used to alter 
foo's last-modified time, in both strace outputs.




This bug report was last modified 7 years and 292 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.