Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

moving files around

Posted on 2002-03-03
7
Medium Priority
?
217 Views
Last Modified: 2013-12-27
Hi..

 i try to move one large .dmp file
 to other disk space.

 let say from /export/m.dmp to /tmp directory

 in export the files is owned by sysops
 
 $ -rwxr-xr-x   1 sysops   dba

 when i cp the file to /tmp

 the owner is root.

 i try to move using sysops id but get error
 'no permission,access denied'

 how can i grant back the file to sysops.

 tq
 sun newbie
0
Comment
Question by:ismahwati
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 38

Expert Comment

by:yuzh
ID: 6838433
If you use cp command, the file permission will change, use
the tar command instead.

  delete the file in tmp first,
     rm /tmp/m.dmp

  make a copy of the file in /export, and put it to /tmp,

  cd /export
  tar cf - m.dmp  | (cd /tmp ; tar xvf -)

  the above commands will do the job for you.

=====
yuzh
0
 
LVL 4

Expert Comment

by:Otetelisanu
ID: 6838520
Use
cp -p file newfile
with p the owner and group
is same
0
 

Author Comment

by:ismahwati
ID: 6838548
i try the cp -p file newfile..

but i does not maintain the owner
it change  the sysops to root / other.

 tq
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 51

Accepted Solution

by:
ahoffmann earned 200 total points
ID: 6838895
-p option works for Sun's propietary /usr/xpg4/bin/cp only.

Either use the given tar solution, or make
   chown sysop newfile
after copying.
0
 

Author Comment

by:ismahwati
ID: 6840982
tq
it helps
0
 

Author Comment

by:ismahwati
ID: 6840983
tq
it helps
0
 

Author Comment

by:ismahwati
ID: 6840985
tq
it helps
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
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.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

604 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