[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fwd: rfe? cp from symlink -> to symlink? cp symlink meta-info(target) wi
From: |
L A Walsh |
Subject: |
Fwd: rfe? cp from symlink -> to symlink? cp symlink meta-info(target) with "-a"? (vs. no diagnostic) |
Date: |
Thu, 25 Oct 2018 16:52:13 -0700 |
User-agent: |
Thunderbird |
I sent this a few hours ago, but haven't seen it come up on this list.
Is the list ok, or just being slow?
FWIW, I left of the 's' on this addr, and got back a bounce in less than a
minute.
That's why I'm wondering about the rtt of a non-bounce mail?
I'm mostly just seeing messages from "assaf gordon"...
-------- Original Message --------
Subject: rfe? cp from symlink -> to symlink? cp symlink meta-info(target) with
"-a"? (vs. no diagnostic)
Date: Thu, 25 Oct 2018 12:58:20 -0700
From: L A Walsh <>
To: Coreutils <address@hidden>
Created following test dir (as seen by tree) in /tmp
tree mybin
Ishtar:/tmp> tree mybin
mybin
├── iptool -> alt-tool #broken link
├── iptool-restore -> iptool #broken link
├── iptool-save -> iptool #broken link
└── usr
└── mybin
├── alt-tool
├── iptool -> alt-tool
├── iptool-restore -> iptool
├── iptool-save -> iptool
├── junka
├── junkb
└── junkc
3 directories, 9 files
----
So first I try copying iptool-save from mybin/usr/mybin to /tmp/mybin
Ishtar:/tmp/mybin/usr/mybin> cp --preserve=all iptool-save /tmp/mybin/
cp: not writing through dangling symlink '/tmp/mybin/iptool-save'
then try:
Ishtar:/tmp/mybin/usr/mybin> /bin/cp -r --preserve=all -iptool-save
/tmp/mybin/
(and get no error message)
It seems to have _re_copied the link (time is updated on that link)
but it didn't recursively follow the link and copy the destination.
(nor with -a). Why did it act as though I said "force" and recopy the
link (unexpected), but didn't recursively follow the link to its target?
(not entirely expected, but wanted).
Especially if I use '-a', shouldn't copying a symlink also copy the
material pointed to -- i.e. duplicated the symlink structure at the target?
One *could* consider the target file "metadata" of the symlink, so at least,
"-a" could cover that case.
It seems odd to silence the diagnostic with "-r" and "-a", but not
recursively follow the link...(I know traditionally -r has referred to
directory structure, but in this case it would be more important & useful
to copy the symlink structure -- ESPECIALLY, since the target symlink
does not exist. Maybe only overwrite symlink target with "-af"?
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Fwd: rfe? cp from symlink -> to symlink? cp symlink meta-info(target) with "-a"? (vs. no diagnostic),
L A Walsh <=