How to copy directories to a directory using installation in bash?

Assume the nested directories foo/bar and the empty dest directory. I would like to call something like install foo dest so that dest contains the foo/bar directory.

I tried the following:

install foo dest => install: exclude the directory "foo"

install -d foo dest => nothing happens

+7
linux unix bash shell install
source share
1 answer

Instead, you want to use cp -r :

 cp -r foo dest 
+3
source share

All Articles