G
G
Grisha Nadezhin2021-07-01 16:11:52
linux
Grisha Nadezhin, 2021-07-01 16:11:52

Copying files in linux?

Hello everyone, I need to copy the contents from folder A to folder B,
I do it with the command: cp -r A B
then go to B: cd / B and write ls
I see that now there is inside folder B And I don’t need it, how to write the command so that inside B would be the contents of A and not the folder A itself?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
H
hint000, 2021-07-01
@omi_yang

cp -r A/* B

A
Alexander Falaleev, 2021-07-01
@suffix_ixbt

More correctly:
cp -a /source/. /target

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question