help-debbugs
[Top][All Lists]
Advanced

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

Re: bug#47151: closed (Re: bug#47151: cp --recursive funky behaviour)


From: Tomas
Subject: Re: bug#47151: closed (Re: bug#47151: cp --recursive funky behaviour)
Date: Mon, 21 Feb 2022 15:49:06 -0300
User-agent: Zoho Mail

Hello.

Interesting, so cp complies to the posix specifications.

I found this, I am not sure whether it's the right specs.

https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/
"2) f) The files in the directory source_file shall be copied to the directory dest_file, taking the four steps (1 to 4) listed here with the files as source_files."

Is this the relevant part? It seems to me that this would support copying src/a and src/b (the files in the directory source_file) to dest/a and dest/b (copied to the directory dest_file) rather than to dest/src/a and dest/src/b (which would be copying the directory, not the files in the directory). But maybe I'm missing a part of the spec or am interpreting it differently.

Regards, Tomas.




---- Activado lun, 21 feb 2022 06:55:03 -0300 GNU bug Tracking System <help-debbugs@gnu.org> escribió ----

Your bug report

#47151: cp --recursive funky behaviour

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 47151@debbugs.gnu.org.

--
47151: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=47151
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems


========================= Forwarded message =========================

Subject: Re: bug#47151: cp --recursive funky behaviour
From: "Paul Eggert"<eggert@cs.ucla.edu>
Date: Mon, 21 Feb 2022 01:54:02 -0800
To: "Tomas"<correo@tomaszubiri.com>
Cc: <47151-done@debbugs.gnu.org>

------------------------- Contents -------------------------

On 3/14/21 17:47, Tomas wrote:
> cd /tmp
> mkdir src
> touch src/a
> cp -r src dest
>
> #damn, I forgot a file
> touch src/b
> cp -r src dest
> ls dest
> # a dest

cp has behaved that way for ages, and is required to behave that way by
POSIX, so this is not a bug. To sidestep the issue, you can use the -T
option of GNU cp. Closing the bug report.



====================== End of Forwarded Mail ======================



========================= Forwarded message =========================

Subject: cp --recursive funky behaviour
From: "Tomas"<correo@tomaszubiri.com>
Date: Sun, 14 Mar 2021 21:47:05 -0300
To: "bug-coreutils"<bug-coreutils@gnu.org>

------------------------- Contents -------------------------

cd /tmp
mkdir src
touch src/a
cp -r src dest
#damn, I forgot a file
touch src/b
cp -r src dest
ls dest
# a dest







====================== End of Forwarded Mail ======================




reply via email to

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