-r (copy recursively) and specify the new name
cp -r /path/to/directory /path/to/location/new-name
replace with the real paths... for example to copy
stuff from my home directory to an existing directory
backup and name the new directory
stuff-backup (if this directory already exists, note that
stuff will be copied into it, not overwrite it).
cp -r ~/stuff ~/backup/stuff-backup
~ is a shortcut for your home directory
/home/zanna in my case. You can omit it if the current working directory is your home directory - you can see this from your prompt
^--the ~ here is where I am - home!
You can add the
-v verbose flag to make
cp report each copy being performed...
$ cp -vr stuff backup/stuff-backup
'stuff/thing1' -> 'backup/stuff-backup/thing1'
'stuff/thing2' -> 'backup/stuff-backup/thing2