In Android shell (also a linux distro), I want to copy a whole folder to a different folder without specifying the folder name. For example:
cp -R /storage/emulated/0/.Data /storage/emulated/0/backup
After this command, my backup folder should contain the
.Data folder and all of it's content. But when I run to run this, only the content of
.Data is copied directly to the
backup folder (without the .Data parent folder) , that's not what I want.
There is another method, but this is not a generic method so I don't want to apply it:
cp -R /storage/emulated/0/.Data /storage/emulated/0/backup/.Data
Can you please show me how to copy the whole directory without specifying in detail the destination name the folder should have?