March 1, 2015

How to copy multiple directories from one directory to another directory in linux system ?

# for example, a list between {}...

# for example, a list between {}
cd source_dir
cp -r {tic,tac,toe} destination_dir

Like  (5 likes)


consider this (simple) directory structure.

and you want to copy 'user2' and 'user3' from /home to /new-home.
you'd do it like this:
cd /home
cp -a user[23] /new-home
(the -a means 'copy all recursively')
that's it.

Like  (12 likes)
Click Here!