Closed fbs2016 closed 1 year ago
That is expected behavior, its called prefix match.
@harshavardhana Thanks. I know the option "--recursive" is target to folder copy only. For the folder copy case, source folder testFoder and testFolder1, mc cp --recursive testFolder destPath, it also copy testFolder and testFoder1. And how to run the command if I just want to copy testFoder only? Thanks
And it's diff with linux ls/cp command, "-r" will not call the prefix match, prefix* can do this match.
just add /
at the end if you want cp
to terminate at testFolder
-> mc cp -r testFolder/ destPath/
@harshavardhana Thanks add / as testFolder/, it just copy all files in testFolder like testFolder/* and the output is destPath/filesIntestFolder not I want. I want copy the folder with path to destPath like destPath/testFolder as result.
@harshavardhana Thanks add / as testFolder/, it just copy all files in testFolder like testFolder/* and the output is destPath/filesIntestFolder not I want. I want copy the folder with path to destPath like destPath/testFolder as result.
Then do mc mirror
Expected behavior
Take cp command as example, cp one file(testFile) only.
Actual behavior
copy 2 files testFile and testFile1.
Steps to reproduce the behavior
In source path, it includes 2 files, testFile and testFile1. mc cp --recursive ./testFile $destpath It copy testFile and testFile1 like copy testFile*.
mc --version
mc --version
) mc --version mc version DEVELOPMENT.GOGET (commit-id=DEVELOPMENT.GOGET) Runtime: go1.21.1 linux/amd64 Copyright (c) 2015-0000 MinIO, Inc. License GNU AGPLv3 https://www.gnu.org/licenses/agpl-3.0.htmlSystem information