Bug 248591 - The i and u switches for cp do not work together
Summary: The i and u switches for cp do not work together
Alias: None
Product: Fedora
Classification: Fedora
Component: coreutils   
(Show other bugs)
Version: 7
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Ondrej Vasik
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: F8Target
TreeView+ depends on / blocked
Reported: 2007-07-17 16:55 UTC by zeno
Modified: 2007-11-30 22:12 UTC (History)
1 user (show)

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

Attachments (Terms of Use)

Description zeno 2007-07-17 16:55:34 UTC
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 08:21:22 UTC
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 08:56:40 UTC
I've fixed this upstream.

Comment 3 Ondrej Vasik 2007-10-25 13:21:32 UTC
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 23:43:16 UTC
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.