bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#18681: The Linux cp command has bugs


From: Polehn, Mike A
Subject: bug#18681: The Linux cp command has bugs
Date: Fri, 10 Oct 2014 20:00:52 +0000

Hi Assaf!

Thank you for your quick response!

There is always multiple ways to do things. The git tool has a diff tool built 
in that makes file comparison easy.

I have run across multiple times that copying one tree over another is 
desirable.

In another bug message thread, we found that the cause was cp alias to 'cp -i' 
for root user was the actual cause.

This still left the incorrect operation of the interactive operation when both 
-i and -f is used.

I think that in some cases the need of override the '-i' with '-f' maybe very 
desirable. So maybe having the '-f' cancel or override the '-i' operation might 
be a good change.

Thanks!
Mike

-----Original Message-----
From: Assaf Gordon [mailto:address@hidden 
Sent: Friday, October 10, 2014 12:14 PM
To: Polehn, Mike A; address@hidden
Subject: Re: bug#18681: The Linux cp command has bugs

Hello Mike,

On 10/10/2014 01:25 PM, Polehn, Mike A wrote:>
> Problem need to copy a tree of 1000s of files to another directory 
> that is a git directory that has a whole bunch of additional build 
> files, so diff between the directories will not do any good.
>

This is slightly off-topic, but if you want to compare only files managed by 
git (ignoring other files in current directory), perhaps the following would 
help:

     # Download and extract the tarball
     wget -q http://dpdk.org/browse/dpdk/snapshot/dpdk-1.7.1.tar.gz
     tar -xf dpdk-1.7.1.tar.gz

     # Clone the git repo with specific branch, checkout the relevant branch
     # (or go to an existing checked-out repository directory)
     git clone git://dpdk.org/dpdk
     cd dpdk
     git checkout -b map_v1.7.1 v1.7.1

     # For each file managed by git (with 'git ls'),
     # compare it to the corresponding file in the other directory:
     git ls -0 | xargs -0 -I% diff -q % ../dpdk-1.7.1/%


Regards,
  -gordon





reply via email to

[Prev in Thread] Current Thread [Next in Thread]