Using cp command in linux shell, how do I copy a whole directory into another directory?
cp will not create leading directories; when it sees a path that does not exist, it will assume that it shall be the new name of the directory being copied.
Try copying into a directory that already exists: mkdir work
first, then cp -r work backup
.