Home>

Environment
centos7

[env-test1] $ls -la
total 16
drwxrwxr-x 2 centos centos 18 Nov 27 13:18.
drwx ------. 17 centos centos 8192 Nov 27 13:17 ..
-rw-rw-r-- 1 centos centos 6 Nov 27 13:18 .env
[env-test2] $ls -la
total 12
drwxrwxr-x 2 centos centos 6 Nov 27 13:29.
drwx ------. 17 centos centos 8192 Nov 27 13:17 ..
$cp env-test1/* env-test2 /.
cp: cannot stat ‘env-test1/*’: No such file or directory

When copying files in a folder at once, files beginning with.such as.envare not recognized.
Is there a corresponding option for copying?

Or is there a way to copy one file at a time as follows?

$cp env-test1/.env env-test2/.env

If i have time, please let me know.