bug#47014: Design flaw: incompatible touch '-f' gnu-option causes loss o
From:
L A Walsh
Subject:
bug#47014: Design flaw: incompatible touch '-f' gnu-option causes loss of (meta)data by default
Date:
Mon, 08 Mar 2021 15:27:54 -0800
User-agent:
Thunderbird 2.0.0.24 (Windows/20100228)
gnu accepts but ignores the previously active '-f'(from) switch
and replaced it with '-r' to be compatible with posix, likely,
but created a meta-data loss case in that if someone
uses it:
ll foo bar
-rw-rw-r-- 1 0 Mar 8 14:33 bar
-rw-rw-r-- 1 0 Dec 10 2012 foo
Want to transfer D/T from foo(^) to bar(^)
/usr/bin/touch -f bar foo #no warning or error
ll foo bar
-rw-rw-r-- 1 0 Dec 10 2012 bar
-rw-rw-r-- 1 0 Dec 10 2012 foo
instead the original information time/date
metadata is lost.
Proposal: make '-f' equivalent to '-r' to
implement safe and user-friendly behavior.
User-annoying behavior: issue warning with
use of '-f' but accept as equivalent to '-r'
User-unfriendly behavior: issue error and
do nothing (even if '-r' is given).
User-hostile behavior: do nothing: let user
damage the metadata on their files.