![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| file permission 000 | zedex | UNIX for Dummies Questions & Answers | 4 | 12-03-2007 05:02 PM |
| File Permission | msg098 | UNIX for Dummies Questions & Answers | 1 | 04-03-2007 02:24 AM |
| File Permission | KhawHL | UNIX for Advanced & Expert Users | 2 | 05-24-2006 06:05 AM |
| Scripting problems | lewisoco | Shell Programming and Scripting | 13 | 09-12-2005 04:38 PM |
| File permission | cleanice | UNIX for Dummies Questions & Answers | 3 | 09-10-2005 02:05 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Scripting file permission problems...
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... |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|