Subject: Re: bug#27942: Bug regarding "touch" command
From: Paul Eggert <[email-masked]>
To: pavan kumar yalavarthi <[email-masked]>, [email-masked]
Date: Fri, 4 Aug 2017 00:16:23 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

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.