Copy files from one directory into an existing directory

In bash I need to do this:

  1. take all files in a directory

  2. copy them into an existing directory

How do I do this? I tried cp -r t1 t2 (both t1 and t2 are existing directories, t1 has files in it) but it created a directory called t1 inside t2, I don’t want that, I need the files in t1 to go directly inside t2. How do I do this?

9 Answers
9

Leave a Comment