|
From: | Paul Eggert |
Subject: | bug#61386: [PATCH] cp,mv,install: Disable sparse copy on macOS |
Date: | Sat, 11 Feb 2023 10:19:55 -0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 |
On 2023-02-10 17:27, George Valkov wrote:
I’d prefer a timestamp consistent with source.
You can get that with 'cp -p' (or with 'cp --preserve=timestamps' etc.). So this is not an issue of whether you can get what you prefer. It's merely an issue about what cp's default behavior is, when the user doesn't specify options.
POSIX is reasonably clear that if you use plain cp to create a file, the file's last-modified time should be the current time. And it's not just a question of standards conformance: lots of real-world uses of 'cp' expect this behavior. For example, people use plain 'cp' in Makefiles, and 'make' relies on the last-modified time being the current time. If cp changed this behavior, it'd break a lot of builds.
[Prev in Thread] | Current Thread | [Next in Thread] |