GNU bug report logs -
#79931
possible option additions/changes for GNU "touch"
Previous Next
To reply to this bug, email your comments to 79931 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-coreutils <at> gnu.org:
bug#79931; Package
coreutils.
(Mon, 01 Dec 2025 17:04:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Paul Eggert <eggert <at> cs.ucla.edu>:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org.
(Mon, 01 Dec 2025 17:04:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Opening up a new bug report number for this, in reply to a message
involving Bug#79907.]
On 2025-12-01 00:25, Stan Marsh wrote:
> I've often wished that "touch" had an option like -c, but the opposite
> - that is, *always* create (and generate an error if the file already
> exists) (*).
What use cases would there be for -c?
NetBSD "touch" has these options:
-D Don't change a file's times if they're already OK.
-R FILE Like -r FILE, but don't follow symlinks.
I.e., NetBSD -h affects only whether symlinks are followed in the target
file, not in the reference file. This is incompatible with GNU touch.
For example, with NetBSD:
touch -Dhr SYMLINK SYMLINK
updates SYMLINK's timestamp to be that of the file it references; there
is no easy way to do that with GNU touch. Perhaps we should change GNU
touch to be compatible with NetBSD in this respect.
FreeBSD "touch" has this option:
-A [-][[HH]MM]SS]
Adjust the access and modification times by HH:MM:SS.
This implies -c.
This is for when you have a bunch of files with wrong timestamps (e.g.,
you imported them from MS-DOS and they had the wrong timezone). This
might be a useful flag to add to GNU "touch".
Information forwarded
to
bug-coreutils <at> gnu.org:
bug#79931; Package
coreutils.
(Mon, 01 Dec 2025 17:16:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 79931 <at> debbugs.gnu.org (full text, mbox):
On 2025-12-01 09:03, Paul Eggert wrote:
>> I've often wished that "touch" had an option like -c, but the opposite
>> - that is, *always* create (and generate an error if the file already
>> exists) (*).
>
> What use cases would there be for -c?
Sorry, I meant to write, "What use cases would there be for this new
option?"
This bug report was last modified 3 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.