I just want to copy the contents of a directory and the subdirectories within it over to another directory in a Bash shell. I assumed
cp -r would do this.
However, this isn't working:
cp -r $BASEDIR/Upload/Temp $BASEDIR/backup
Temp has a bunch of files and directories in it. But after I run this command, I only get the files in
backup. No directories are copied.
I'm also having the same problem with the
-r option with a
zip command. In the same Bash shell, I've got these commands:
cd $BASEDIR/Upload/Temp zip -r $BASEDIR/Backup2/backup2.zip .
When I look at the contents of
backup2.zip, all it has are the files, no subdirs. (I
cd into the directory because it's the only way I know to store files in a zip without getting the absolute path stored as well, which I don't need.)
What am I not getting about the