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


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#27942: closed (Bug regarding "touch" command)
Date: Fri, 04 Aug 2017 07:17:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 4 Aug 2017 00:16:23 -0700
with message-id <a3c0030c-5947-c4a3-9f4a-ee0c9255896a <at> cs.ucla.edu>
and subject line Re: bug#27942: Bug regarding "touch" command
has caused the debbugs.gnu.org bug report #27942,
regarding Bug regarding "touch" command
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
27942: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=27942
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: pavan kumar yalavarthi <yalavarthi.pavankumar.123 <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: Bug regarding "touch" command
Date: Fri, 4 Aug 2017 11:05:53 +0530
[Message part 3 (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 4 (text/html, inline)]
[Message part 5 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: pavan kumar yalavarthi <yalavarthi.pavankumar.123 <at> gmail.com>,
 27942-done <at> debbugs.gnu.org
Subject: Re: bug#27942: Bug regarding "touch" command
Date: Fri, 4 Aug 2017 00:16:23 -0700
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.


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.