I have this structure:
tempdir3
tempdir2
|--tempfile1
|--tempfile2
|--tempfile3
|
|--tempdir1
......|--tempfile1
.....|--tempfile2
.....|--tempfile3
I want to copy /tempdir2/tempdir1/tempfile1 into tempdir3...
ie I want the stucture /tempdir2/tempdir1/tempfile1 in /tempdir3 not just the file tempfile1...
I used the command:
cp -p /tempdir2/tempdir1/tempfile1 tempdir3
This only copies tempfile1 into tempdir3. I want the structure from /tempdir2 onwards to go in there. Grrr!
It's like as if I'm just doing:
cp /tempdir2/tempdir1/temp1file1 tempdir3...
I'm using Redhat 8 and the man page isn't really clear on this. Any ideas?