Skip to content

Unexpected cp behaviour with directories #15

@brendandahl

Description

@brendandahl

With unix cp you can do

cp -Rf oneDir/ twoDir/

which copies all the files in oneDir into twoDir. When I do:

cp('-Rf', 'oneDir/', '/twoDir/');

nothing gets copied, I have to do

cp('-Rf', 'oneDir/*', '/twoDir/');

from man cp

If source_file designates a directory, cp copies the directory and the entire subtree connected
at that point. If the source_file ends in a /, the contents of the directory are copied rather
than the directory itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions