Red Hat Bugzilla – Bug 248591
The i and u switches for cp do not work together
Last modified: 2007-11-30 17:12:10 EST
Description of problem:
The i and u switches for the cp command do not work correctly.
Version-Release number of selected component (if applicable):
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.
You will be prompted to overwrite file2.
You should not be prompted. The u switch indicates that the file should only be
copied if file1 is newer than file2.
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)
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.
I've fixed this upstream.
Built as coreutils-6.9-4.fc7 and pushed to testing. (coreutils-6.9-8.fc8 is for F8)
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.