The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 03-22-2005
Heron Heron is offline
Registered User
  
 

Join Date: Mar 2005
Posts: 10
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
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:00 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0