Hello all -
I have two systems.
1) Linux box running Redhat 8.0
2) Tru64 box running V4.0f
From the Linux box I am remotely mounting a directory (nfs mount) that resides on the Tru64 machine.
The directory that is nfs mounted contains two subdirectories:
my_dir1
my_dir2
I want to run a script that will:
1) Copy my_dir1 to my_dir1_saved
2) Copy my_dir2 (rename) to my_dir1
So, basically you now have:
my_dir1_saved (previously my_dir1)
my_dir1 (previously my_dir2)
my_dir2
I want to keep the original my_dir1 around - thus the need to cp (rename) my_dir1 to my_dir1_saved. Then, I want to copy my_dir2 and make it my_dir1.
I don't want to use the mv command - we want to have all the original files around.
My problem is this:
I'm using the cp command this way:
cp -rpf my_dir1 my_dir1_saved
cp -rpf my_dir2 my_dir1
The problem is that file permissions, ownership, and group aren't being kept when I do the copy command.
Any help will be appreciated...