Skip to content

cp -r doesn't merge contents of folders when containing the same folders like GNU cp does #9318

@Alxhr0

Description

@Alxhr0

Version

uutils-coreutils: 0.4.0

cp -r vmware-workstation/share/* vmware-workstation/man vmware-network-editor-ui/share/* vmware-player-app/share/* test

cp: will not overwrite just-created 'test/applications' with 'vmware-network-editor-ui/share/applications'

Meanwhile GNU coreutils just merged the contents of all directories together without overwriting anything

cp -r vmware-workstation/share/* vmware-workstation/man vmware-network-editor-ui/share/* vmware-player-app/share/* test

ls -la test/*
test/appdata:
total 8
drwxr-xr-x 1 alxhr alxhr 110 Nov 18 04:01 .
drwxr-xr-x 1 alxhr alxhr  62 Nov 18 04:01 ..
-rw-r--r-- 1 alxhr alxhr 812 Nov 18 04:04 vmware-player.appdata.xml
-rw-r--r-- 1 alxhr alxhr 884 Nov 18 04:04 vmware-workstation.appdata.xml

test/applications:
total 12
drwxr-xr-x 1 alxhr alxhr 136 Nov 18 04:01 .
drwxr-xr-x 1 alxhr alxhr  62 Nov 18 04:01 ..
-rw-r--r-- 1 alxhr alxhr 196 Nov 18 04:04 vmware-netcfg.desktop
-rw-r--r-- 1 alxhr alxhr 272 Nov 18 04:04 vmware-player.desktop
-rw-r--r-- 1 alxhr alxhr 318 Nov 18 04:04 vmware-workstation.desktop

test/icons:
total 0
drwxr-xr-x 1 alxhr alxhr 14 Nov 18 04:01 .
drwxr-xr-x 1 alxhr alxhr 62 Nov 18 04:01 ..
drwxr-xr-x 1 alxhr alxhr 80 Nov 18 04:01 hicolor

test/man:
total 0
drwxr-xr-x 1 alxhr alxhr  8 Nov 18 04:01 .
drwxr-xr-x 1 alxhr alxhr 62 Nov 18 04:01 ..
drwxr-xr-x 1 alxhr alxhr 22 Nov 18 04:01 man1

test/mime:
total 0
drwxr-xr-x 1 alxhr alxhr 16 Nov 18 04:01 .
drwxr-xr-x 1 alxhr alxhr 62 Nov 18 04:01 ..
drwxr-xr-x 1 alxhr alxhr 34 Nov 18 04:01 packages

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions