On 3/10/25 03:56 PM, uw...@online.de wrote:
hi,
i try to use
cp -ax / /mnt
(cp space -ax space / space /mnt)
which in debian 9,10,11 worked fine
but in debian 12 (and lmde 6 (LinuxMintDebianEdition)) it does not work.
the error is:
#root@Server001:~# cp -ax / /mnt
#cp: das Verzeichnis '/mnt/' kann nicht angelegt werden: Datei oder
Verzeichnis nicht gefunden
translated: the subdir /mnt/ cannot be created. file or subdir not found.
i try to copy a ext4 filesystem to an second disk with ext4 filesystem.
you can try with and without mounting a disk to /mnt
the error is always the same.
is it a bug or a new feature ?
best regards
uwe t
Hi,
I am running Debian 12.9.
First it seems like a bad idea to try to copy a directory into a
subdirectory of itself.
So without a disk mounted to /mnt I would expect cp -ax / /mnt to fail.
And it does for me with this error:
cp: cannot copy a directory, '/', into itself, '/mnt/'
As for with an external disk mounted on /mnt, I think the -x option,
which is described as "stay on this file system", which I presume means
for the source to the command, would allow it to work.
When I tried that, it appeared to work without issue, though I did stop
the copy in my test before much had been copied. By "much" I mean
several G, not the full data available from the source.
So it looks to me like it works as expected, at least for me.
Is there any other info that might help figure this out?
Bob