From unknown Sat Aug 16 19:20:03 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9513: improvement remark for "cp" Resent-From: Charles ELSAESSER WebmailOrange Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 15 Sep 2011 13:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 9513 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 9513@debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@gnu.org Reply-To: Charles ELSAESSER WebmailOrange Received: via spool by submit@debbugs.gnu.org id=B.131609298916258 (code B ref -1); Thu, 15 Sep 2011 13:24:01 +0000 Received: (at submit) by debbugs.gnu.org; 15 Sep 2011 13:23:09 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R4BuG-0004EA-Fv for submit@debbugs.gnu.org; Thu, 15 Sep 2011 09:23:09 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R4B3B-0008Gw-Qf for submit@debbugs.gnu.org; Thu, 15 Sep 2011 08:28:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R4Ayd-0007Ec-LQ for submit@debbugs.gnu.org; Thu, 15 Sep 2011 08:23:39 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_NJABL_PROXY autolearn=no version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:39030) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4Ayd-0007EY-Jt for submit@debbugs.gnu.org; Thu, 15 Sep 2011 08:23:35 -0400 Received: from eggs.gnu.org ([140.186.70.92]:50888) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4AyZ-0004sD-Js for bug-coreutils@gnu.org; Thu, 15 Sep 2011 08:23:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R4AyT-0007DU-V2 for bug-coreutils@gnu.org; Thu, 15 Sep 2011 08:23:31 -0400 Received: from smtp02.smtpout.orange.fr ([80.12.242.124]:37413 helo=smtp.smtpout.orange.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4AyT-0007D6-LB for bug-coreutils@gnu.org; Thu, 15 Sep 2011 08:23:25 -0400 Received: from wwinf1f12 ([10.232.36.55]) by mwinf5d55 with ME id Z0Q11h00C1BPASJ030Q1iq; Thu, 15 Sep 2011 14:24:01 +0200 X-ME-engine: default Date: Thu, 15 Sep 2011 14:23:23 +0200 (CEST) From: Charles ELSAESSER WebmailOrange Message-ID: <15285710.8829.1316089403317.JavaMail.www@wwinf1f12> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [81.49.208.176] X-WUM-FROM: |~| X-WUM-TO: |~| X-WUM-REPLYTO: |~| X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.0 (-----) X-Mailman-Approved-At: Thu, 15 Sep 2011 09:23:06 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.0 (-----) Bonjour, Here is bug report. Thank you for what can be done. symptom ------- cp -p file1 file2 does not preserve timestamp. ls -l file1 file2 -rwxr-xr-x. 1 joe joe 11626 9 sept. 23:20 file2 -rwxr-xr-x. 1 joe joe 11626 9 sept. 23:20 file1 ls --full-time $f1 $f2 -rwxr-xr-x. 1 joe joe 11626 2011-09-09 19:20:27.000000000 +0200 file2 -rwxr-xr-x. 1 joe joe 11626 2011-09-09 19:20:26.000000000 +0200 file1 cmp $f1 $f2 echo $? 0 comment ------- French man page says that timestamp will be slightly different between orig= inal and copy because copy operation needs a read access to source file. On the documentation point of view, this seems to be a wrong expression bec= ause reading timestamp original file needs a read access to structures of directory containing original file, which helds the last access time actime and the last modification time mtim= e but not to file itself. But after processing of "cp -p file1 file2" , the different timestamps betw= een the two files seems to be not conform to the "cp -p " functionality. Actually, if copy process of "file1" on "file2" is long ( minutes, hours, .= ..) when destination hardwares are slow, then timestamps can be very different. Am I wrong? As a consequence when processing after this a cp -u file1 file2 update is not processed because destination file is newer than original fil= e. Other consequences may happen on files management applications. action ------ At least user should be warned by a mention in man page of "cp" of existenc= e of function "touch" which seems to execute the timestamp setting, if requ= ested. When user requires "cp -p" he cannot suspect that his requirement will not = be executed. Can anything be done to correct GNU "cp" function, for example processing a= "touch" like function ? system technical level ---------------------- SLinux localhost 2.6.32-131.12.1.el6.i686 #1 SMP Tue Aug 23 11:12:55 CDT 20= 11 i686 i686 i386 GNU/Linux software technical level ------------------------ cp (GNU coreutils) 8.4 GNU coreutils 8.4 November 2010 CP(1) man documentation level ( french) --------------------------------- TRADUCTION Ce document est une traduction r=C3=A9alis=C3=A9e par Christophe Blaess le 5 d=C3=A9cembre 1996, mise =C3=A0 jour par Alain Portal le 8 juillet 2005 et r=C3=A9vis=C3=A9e le 19 novembre 2007. i.e. TRANSLATION This document is a translation processed by Christophe Blaess on 5 december 1996, updated by Alain Portal on 8 july 2005 and revised on 19 novembre 2007. comments in man documentation ( french) --------------------------------------- OPTIONS POSIX Posix d=C3=A9finit quatre options et demi : ... -p Conserver le propri=C3=A9taire, le groupe, les permissions d=E2=80=99acc= =C3=A8s et les horodatages du fichier original. Si la conservation du propri=C3=A9taire ou du groupe est impossible, les bits Set-UID et Set-GID sont effac=C3=A9s. L=E2=80=99horodatage sera quand m=C3=AAme l=C3=A9g=C3=A8rement diff=C3=A9re= nt entre l=E2=80=99original et la copie car l=E2=80=99op=C3=A9ration de copie n=C3=A9cessite un acc=C3=A8s= en lecture au fichier source. ... OPTIONS GNU ... -p, --preserve Conserver le propri=C3=A9taire, le groupe, les permissions d=E2=80=99acc=C3= =A8s et les horodatages du fichier original. ... i.e. ( french comments translated to english) OPTIONS POSIX Posix defines four options and a half : ... -p Keep owner,group, access rights and timestamps of original file. If owner or group cannot be kept, then bits Set-UID and Set-GID are erased. Timestamp may be slightly different between original and copy because copy operation needs a read access to source file. ... OPTIONS GNU ... -p, --preserve Keep owner, group, access rights and timestamp of original file. From unknown Sat Aug 16 19:20:03 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9513: improvement remark for "cp" Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 15 Sep 2011 16:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9513 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Charles ELSAESSER WebmailOrange Cc: 9513@debbugs.gnu.org Received: via spool by 9513-submit@debbugs.gnu.org id=B9513.131610520111986 (code B ref 9513); Thu, 15 Sep 2011 16:47:01 +0000 Received: (at 9513) by debbugs.gnu.org; 15 Sep 2011 16:46:41 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R4F5C-000370-Ku for submit@debbugs.gnu.org; Thu, 15 Sep 2011 12:46:40 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R4F57-00034Y-Pp for 9513@debbugs.gnu.org; Thu, 15 Sep 2011 12:46:35 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id A75AE39E80F8; Thu, 15 Sep 2011 09:41:53 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HfiiqHBkozGH; Thu, 15 Sep 2011 09:41:53 -0700 (PDT) Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id E764239E80F7; Thu, 15 Sep 2011 09:41:52 -0700 (PDT) Message-ID: <4E722AD0.2060307@cs.ucla.edu> Date: Thu, 15 Sep 2011 09:41:52 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.21) Gecko/20110831 Thunderbird/3.1.13 MIME-Version: 1.0 References: <15285710.8829.1316089403317.JavaMail.www@wwinf1f12> In-Reply-To: <15285710.8829.1316089403317.JavaMail.www@wwinf1f12> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.9 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.9 (--) On 09/15/11 05:23, Charles ELSAESSER WebmailOrange wrote: > cp -p file1 file2 > > does not preserve timestamp. That looks like a bug. Can you please try it with coreutils 8.13? That has some fixes in this area; the version you're using (8.4) is a bit old. ftp://ftp.gnu.org/gnu/coreutils/coreutils-8.13.tar.gz If you're still seeing the problem with 8.13, can you please send your config.log (when building coreutils) and the output of the shell command "strace cp -p file1 file2"? Thanks. From unknown Sat Aug 16 19:20:03 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9513: improvement remark for "cp" Resent-From: Jim Meyering Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Sun, 13 Nov 2011 11:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9513 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Paul Eggert Cc: 9513@debbugs.gnu.org, Charles ELSAESSER WebmailOrange Received: via spool by 9513-submit@debbugs.gnu.org id=B9513.132118496414790 (code B ref 9513); Sun, 13 Nov 2011 11:50:01 +0000 Received: (at 9513) by debbugs.gnu.org; 13 Nov 2011 11:49:24 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RPYYs-0003qT-Uf for submit@debbugs.gnu.org; Sun, 13 Nov 2011 06:49:23 -0500 Received: from mx.meyering.net ([88.168.87.75]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RPYYq-0003qH-24; Sun, 13 Nov 2011 06:49:21 -0500 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id C50126006A; Sun, 13 Nov 2011 12:48:51 +0100 (CET) From: Jim Meyering In-Reply-To: <4E722AD0.2060307@cs.ucla.edu> (Paul Eggert's message of "Thu, 15 Sep 2011 09:41:52 -0700") References: <15285710.8829.1316089403317.JavaMail.www@wwinf1f12> <4E722AD0.2060307@cs.ucla.edu> Date: Sun, 13 Nov 2011 12:48:51 +0100 Message-ID: <87ehxcnsyk.fsf@rho.meyering.net> Lines: 26 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.7 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) retitle 9513 cp -p fails to preserve permissions tags 9513 + moreinfo thanks Paul Eggert wrote: > On 09/15/11 05:23, Charles ELSAESSER WebmailOrange wrote: >> cp -p file1 file2 >> >> does not preserve timestamp. > > That looks like a bug. > > Can you please try it with coreutils 8.13? That has some > fixes in this area; the version you're using (8.4) is a bit old. > > ftp://ftp.gnu.org/gnu/coreutils/coreutils-8.13.tar.gz > > If you're still seeing the problem with 8.13, can you > please send your config.log (when building coreutils) > and the output of the shell command "strace cp -p file1 file2"? Hello Charles, The latest release is now coreutils-8.14. Would you please try to reproduce the problem using that version and send us the information that Paul requested? From unknown Sat Aug 16 19:20:03 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9513: improvement remark for "cp" Resent-From: Assaf Gordon Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Tue, 23 Oct 2018 03:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9513 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: moreinfo To: 9513@debbugs.gnu.org Received: via spool by 9513-submit@debbugs.gnu.org id=B9513.154026424731113 (code B ref 9513); Tue, 23 Oct 2018 03:11:02 +0000 Received: (at 9513) by debbugs.gnu.org; 23 Oct 2018 03:10:47 +0000 Received: from localhost ([127.0.0.1]:36901 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gEn5j-00085f-4g for submit@debbugs.gnu.org; Mon, 22 Oct 2018 23:10:47 -0400 Received: from mail-pg1-f169.google.com ([209.85.215.169]:37535) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gEn5h-00085M-I1; Mon, 22 Oct 2018 23:10:45 -0400 Received: by mail-pg1-f169.google.com with SMTP id c10-v6so19969328pgq.4; Mon, 22 Oct 2018 20:10:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=H5jMBBvI7Dy03Wqm1Rx+mxn78Y7Yt7zVBAkW8Wxa9Xo=; b=i5PGGGiTkOBknHDCcJoLoOu9fGnnrGxP+OKqyDWJnLFIgnvBDQpeCzpF7HiiCrENRq EXILpWlacvp5y3bU/RSDefexHFIrhO1FZb0p/BMkI8suby8qQs48920nE2dOdwaCtRWk agNRz9vxPKNaTMB0YBVg52EoBgDDNPetrX1NDMpqIifesKTBv284HIQSd60MuKFZwzSN O5lUcEOWU4moEI7DIEL45nLcQZb1IMsq3Sdmt0/qSTk59PTUdTzMi/bX6i2G4COCl4eC XnVO5THm5BWia9fo+F2aStc6wjt7kQWnMWKAUEbPHvK0CRIsKQHU112ppHBEmAwwrKDS kyCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=H5jMBBvI7Dy03Wqm1Rx+mxn78Y7Yt7zVBAkW8Wxa9Xo=; b=ZXOm5EvrV8lInChbaQRxVdjeN3zjbYgEolwD+2ddYsnXAVHdTBkDX2mjjpHpCOmHeZ C5S8IQbyVfLFn/+Tpl42XAEYDqu3tdOf+HuEJn8lzEFsgjZ7NgPYo67/6cgmMBlQvAOr 8zK7neQNvbGymyRdK/rWyvVqH+ISD3XY67Y853iuGz3WEweJKkomSFJ7+ENF4uBSyoAD MnnSbwc8II9lZyNNHA5T8BwNiMfOls4aKmF8DB0T5S9Iv6o1iad9n28Gh3RbJVEK1Cif 2w0VU3C6Rq0y09RnlEyypNaS3TRxQMDlWwbzWzuQmmAaPX2fDVzhu6DwI0otvwhxQHw/ yftg== X-Gm-Message-State: ABuFfojmh1NICEy30pZ/kLUGtJy+pwR8sx/PMaNilwAiReQS/xLWl/au ljmd04d5H3n4xq+6ALxUOdrNKeeOP5g= X-Google-Smtp-Source: ACcGV603EhwPY0N0G+3eM3Lc+oEkxVt/L09df3uUrdW4iEs1ogPtvSpTbJFZRxbM9RXjn2VPK0RjWQ== X-Received: by 2002:a63:d444:: with SMTP id i4-v6mr44912211pgj.194.1540264238920; Mon, 22 Oct 2018 20:10:38 -0700 (PDT) Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.googlemail.com with ESMTPSA id y24-v6sm61135676pfi.24.2018.10.22.20.10.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Oct 2018 20:10:37 -0700 (PDT) References: <15285710.8829.1316089403317.JavaMail.www@wwinf1f12> <4E722AD0.2060307@cs.ucla.edu> <87ehxcnsyk.fsf@rho.meyering.net> From: Assaf Gordon Message-ID: <3d03a892-ad06-ac9b-e04a-0fa6e4f157c6@gmail.com> Date: Mon, 22 Oct 2018 21:10:36 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <87ehxcnsyk.fsf@rho.meyering.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 9513 stop (triaging old bugs) On 13/11/11 04:48 AM, Jim Meyering wrote: > Paul Eggert wrote: >> On 09/15/11 05:23, Charles ELSAESSER WebmailOrange wrote: >>> cp -p file1 file2 >>> >>> does not preserve timestamp. >> >> That looks like a bug. >> >> Can you please try it with coreutils 8.13? That has some >> fixes in this area; the version you're using (8.4) is a bit old. >> > Hello Charles, > The latest release is now coreutils-8.14. > Would you please try to reproduce the problem using that version > and send us the information that Paul requested? > With no follow-ups in 7 years, I'm closing this bug. -assaf