Bug 248591 - The i and u switches for cp do not work together
The i and u switches for cp do not work together
Product: Fedora
Classification: Fedora
Component: coreutils (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Ondrej Vasik
Fedora Extras Quality Assurance
Depends On:
Blocks: F8Target
  Show dependency treegraph
Reported: 2007-07-17 12:55 EDT by zeno
Modified: 2007-11-30 17:12 EST (History)
1 user (show)

See Also:
Fixed In Version: 6.9-5.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-11-09 18:43:17 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description zeno 2007-07-17 12:55:34 EDT
Description of problem:
The i and u switches for the cp command do not work correctly.

Version-Release number of selected component (if applicable):

How reproducible:
Able to reproduce at will.

Steps to Reproduce:
1. Create a file (file1).
2. Create another file (file2) with the same name in another directory.
3. Make sure file1 has an older file modified date than file2.
4. Use cp -iu to copy file to the directory in the same place as file2.
Actual results:
You will be prompted to overwrite file2.

Expected results:
You should not be prompted. The u switch indicates that the file should only be
copied if file1 is newer than file2.

Additional info:
It prompts you no matter what. And no matter what you pick at the prompt,
nothing will happen. It should not prompt, I have tested other flavors and they
do not prompt. (Note there was no cp Component, so I selected another)
Comment 1 Jim Meyering 2007-07-18 04:21:22 EDT
Thanks for the report.  It is indeed a bug, and it affects the very latest
version upstream, too.  I'll look into fixing it there and let you know the result.
Comment 2 Jim Meyering 2007-07-19 04:56:40 EDT
I've fixed this upstream.
Comment 3 Ondrej Vasik 2007-10-25 09:21:32 EDT
Built as coreutils-6.9-4.fc7 and pushed to testing. (coreutils-6.9-8.fc8 is for F8)
Comment 4 Fedora Update System 2007-11-09 18:43:16 EST
coreutils-6.9-5.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.