GNU bug report logs -
#27942
Bug regarding "touch" command
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 27942 in the body.
You can then email your comments to 27942 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-coreutils <at> gnu.org
:
bug#27942
; Package
coreutils
.
(Fri, 04 Aug 2017 06:26:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
pavan kumar yalavarthi <yalavarthi.pavankumar.123 <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Fri, 04 Aug 2017 06:26:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
" *touch -* " is not working i.e., file named " - " is not being created
using *touch *command in* ubuntu* flavours , but working fine with* linux *
flavours.
[Message part 2 (text/html, inline)]
Reply sent
to
Paul Eggert <eggert <at> cs.ucla.edu>
:
You have taken responsibility.
(Fri, 04 Aug 2017 07:17:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
pavan kumar yalavarthi <yalavarthi.pavankumar.123 <at> gmail.com>
:
bug acknowledged by developer.
(Fri, 04 Aug 2017 07:17:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 27942-done <at> debbugs.gnu.org (full text, mbox):
pavan kumar yalavarthi wrote:
> " *touch -* " is not working i.e., file named " - " is not being created
> using *touch *command in* ubuntu* flavours , but working fine with* linux *
> flavours.
It's not a bug. In coreutils, 'touch -' is documented to touch the standard
output file, not a file named '-'. The POSIX specification for 'touch' allows
either the coreutils behavior or the other behavior that you mentioned. If you
want to touch a file named '-', the command 'touch ./-' is a portable way to do it.
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#27942
; Package
coreutils
.
(Fri, 04 Aug 2017 08:54:02 GMT)
Full text and
rfc822 format available.
Message #13 received at submit <at> debbugs.gnu.org (full text, mbox):
Paul Eggert wrote:
> pavan kumar yalavarthi wrote:
>> " *touch -* " is not working i.e., file named " - " is not being
>> created
>
> It's not a bug. In coreutils, 'touch -' is documented to touch the
> standard output file, not a file named '-'. The POSIX specification
> for 'touch' allows either the coreutils behavior or the other
Thought it was a bit humorous, the bit about touching ... "stdout"?
or... as in "/dev/stdout"? Definitely not in my man page for touch,
new change? I do see it in "touch --help", so seems relatively new.
What is touched ? /dev/stdout?
"Touching the 'file' associated with stdout"?
How would I (or someone) use it? Was/is there a use case
that supported or needed the new feature?
Curious: partially because I was/am amused and see no clue as to how
to use such a feature.
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#27942
; Package
coreutils
.
(Fri, 04 Aug 2017 09:03:01 GMT)
Full text and
rfc822 format available.
Message #16 received at submit <at> debbugs.gnu.org (full text, mbox):
L A Walsh wrote:
> "Touching the 'file' associated with stdout"?
Yes, that's it.
> How would I (or someone) use it?
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.
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#27942
; Package
coreutils
.
(Fri, 04 Aug 2017 09:06:02 GMT)
Full text and
rfc822 format available.
Message #19 received at submit <at> debbugs.gnu.org (full text, mbox):
Paul Eggert wrote:
> L A Walsh wrote:
>> "Touching the 'file' associated with stdout"?
>
> Yes, that's it.
>
>> How would I (or someone) use it?
>
> 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?
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#27942
; Package
coreutils
.
(Fri, 04 Aug 2017 09:11:02 GMT)
Full text and
rfc822 format available.
Message #22 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Thanks,
Can I know why does it work in linux flavours like Red Hat Linux,Kali Linux
but not ubuntu flavours???
y.pavan kumar
On Fri, Aug 4, 2017 at 2:31 PM, Paul Eggert <eggert <at> cs.ucla.edu> wrote:
> L A Walsh wrote:
>
>> "Touching the 'file' associated with stdout"?
>>
>
> Yes, that's it.
>
> How would I (or someone) use it?
>>
>
> 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.
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#27942
; Package
coreutils
.
(Fri, 04 Aug 2017 10:17:01 GMT)
Full text and
rfc822 format available.
Message #25 received at 27942 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Can you please explain why is this working fine in linux system
y.pavan kumar
On Fri, Aug 4, 2017 at 12:47 PM, GNU bug Tracking System <
help-debbugs <at> gnu.org> wrote:
> Your bug report
>
> #27942: Bug regarding "touch" command
>
> which was filed against the coreutils package, has been closed.
>
> The explanation is attached below, along with your original report.
> If you require more details, please reply to 27942 <at> debbugs.gnu.org.
>
> --
> 27942: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=27942
> GNU Bug Tracking System
> Contact help-debbugs <at> gnu.org with problems
>
>
> ---------- Forwarded message ----------
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> To: pavan kumar yalavarthi <yalavarthi.pavankumar.123 <at> gmail.com>,
> 27942-done <at> debbugs.gnu.org
> Cc:
> Bcc:
> Date: Fri, 4 Aug 2017 00:16:23 -0700
> Subject: Re: bug#27942: Bug regarding "touch" command
> pavan kumar yalavarthi wrote:
>
>> " *touch -* " is not working i.e., file named " - " is not being created
>> using *touch *command in* ubuntu* flavours , but working fine with*
>> linux *
>> flavours.
>>
>
> It's not a bug. In coreutils, 'touch -' is documented to touch the
> standard output file, not a file named '-'. The POSIX specification for
> 'touch' allows either the coreutils behavior or the other behavior that you
> mentioned. If you want to touch a file named '-', the command 'touch ./-'
> is a portable way to do it.
>
>
>
> ---------- Forwarded message ----------
> From: pavan kumar yalavarthi <yalavarthi.pavankumar.123 <at> gmail.com>
> To: bug-coreutils <at> gnu.org
> Cc:
> Bcc:
> Date: Fri, 4 Aug 2017 11:05:53 +0530
> Subject: Bug regarding "touch" command
> " *touch -* " is not working i.e., file named " - " is not being created
> using *touch *command in* ubuntu* flavours , but working fine with*
> linux *flavours.
>
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#27942
; Package
coreutils
.
(Fri, 04 Aug 2017 11:29:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 27942 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 08/04/2017 04:09 AM, pavan kumar yalavarthi wrote:
> Thanks,
[top-posting is harder to read on technical lists]
> Can I know why does it work in linux flavours like Red Hat Linux,Kali Linux
> but not ubuntu flavours???
Perhaps you should compare 'touch --version' on the systems with
differing behaviors. If the versions are different, it could be that
you are using an older version on the one where it doesn't work (reading
NEWS can confirm when the feature was changed; in the case of 'touch -',
the behavior was changed for 5.90 back in 2005). If the versions claim
to be the same (or newer than the point where NEWS documents that the
change), then your vendor has applied a downstream patch, and you should
ask your vendor to help you find their downstream patches and why they
want the changed behavior from upstream.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
[signature.asc (application/pgp-signature, attachment)]
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#27942
; Package
coreutils
.
(Fri, 04 Aug 2017 14:41:02 GMT)
Full text and
rfc822 format available.
Message #31 received at 27942 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Thank you for the clarification.
On Aug 4, 2017 4:58 PM, "Eric Blake" <eblake <at> redhat.com> wrote:
> On 08/04/2017 04:09 AM, pavan kumar yalavarthi wrote:
> > Thanks,
>
> [top-posting is harder to read on technical lists]
>
> > Can I know why does it work in linux flavours like Red Hat Linux,Kali
> Linux
> > but not ubuntu flavours???
>
> Perhaps you should compare 'touch --version' on the systems with
> differing behaviors. If the versions are different, it could be that
> you are using an older version on the one where it doesn't work (reading
> NEWS can confirm when the feature was changed; in the case of 'touch -',
> the behavior was changed for 5.90 back in 2005). If the versions claim
> to be the same (or newer than the point where NEWS documents that the
> change), then your vendor has applied a downstream patch, and you should
> ask your vendor to help you find their downstream patches and why they
> want the changed behavior from upstream.
>
> --
> Eric Blake, Principal Software Engineer
> Red Hat, Inc. +1-919-301-3266
> Virtualization: qemu.org | libvirt.org
>
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#27942
; Package
coreutils
.
(Fri, 04 Aug 2017 16:19:02 GMT)
Full text and
rfc822 format available.
Message #34 received at submit <at> debbugs.gnu.org (full text, mbox):
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.
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#27942
; Package
coreutils
.
(Sat, 05 Aug 2017 03:46:01 GMT)
Full text and
rfc822 format available.
Message #37 received at submit <at> debbugs.gnu.org (full text, mbox):
Paul Eggert wrote:
> 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.
---
So the touch command does the same as:
echo -n >>'stdout-file' ?
What was the use-case that touch needed to have
the new feature?
*curious sort*
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#27942
; Package
coreutils
.
(Sat, 05 Aug 2017 05:30:03 GMT)
Full text and
rfc822 format available.
Message #40 received at submit <at> debbugs.gnu.org (full text, mbox):
L A Walsh wrote:
> So the touch command does the same as:
> echo -n >>'stdout-file' ?
Not really.
> What was the use-case that touch needed to have
> the new feature?
It was mainly a desire to get back to the original Unix model, where basic
commands like 'touch' were thin wrappers around system calls.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 02 Sep 2017 11:24:05 GMT)
Full text and
rfc822 format available.
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.