[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Clarification: UNIX cp command

Posted on 2006-05-04
2
Medium Priority
?
701 Views
Last Modified: 2013-11-17
I made a backup of a certain directory using cp command but I forgot to use -p to preserve the owners and permissions.

But I need to overwrite the new files with the backup copy. Can I do that by preserving the ownership and permission of the destination which is the newer copy.

Thanks.
0
Comment
Question by:jryanlee80
2 Comments
 
LVL 46

Accepted Solution

by:
Kent Olsen earned 2000 total points
ID: 16607860
Hi jryanlee80,

Copying the files onto the existing files should not change the ownership or permissions associated with them.  (Try it.  Make a file from your user account and then copy a file onto it from root.)

Just make sure that you are root for the copy so that you're sure to have access to all of the files involved.


Good Luck!
Kent
0
 

Author Comment

by:jryanlee80
ID: 16612648
Thanks.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses
Course of the Month20 days, 7 hours left to enroll

868 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question