copyfiles

anishtv
anishtv used Ask the Experts™
on
cannot copy


I was trying to copy.

 dbhome_1]$ cp -a /dbhome_1/. /dbhome_2/
cp: cannot stat `/dbhome_1/.': No such file or directory


contents are in dbhome_1
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Gerwin Jansen, EE MVETopic Advisor
Most Valuable Expert 2016

Commented:
Try changing that .  to  *
Kent WSr. Network / Systems Admin

Commented:
When in doubt, pump in the full path. I'd stick the recursive flag on that, too. (-r)

Author

Commented:
Kindly update the final format.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Gerwin Jansen, EE MVETopic Advisor
Most Valuable Expert 2016

Commented:
>> Kindly update the final format.
Did you try my suggestion at all? Just type * instead of .
cp -a /dbhome_1/* /dbhome_2/

Open in new window

Do you want to copy folders as well as files below /dbhome_1 - kindly specify what you want.
Kent WSr. Network / Systems Admin

Commented:
cp -ra /path/to/source/* /path/to/target/

That will copy everything.

Author

Commented:
dbhome_1 and dbhome_2 are folders in

/u01/app/oracle/product/12.1.0.2/

There are lot of files in
/u01/app/oracle/product/12.1.0.2/dbhome_1

need to be copied to dbhome_2
Topic Advisor
Most Valuable Expert 2016
Commented:
cp -ra /u01/app/oracle/product/12.1.0.2/dbhome_1/* /u01/app/oracle/product/12.1.0.2/dbhome_2/

Author

Commented:
what is -ra means
Kent WSr. Network / Systems Admin

Commented:
r = recursive, a = archive mode
Gerwin Jansen, EE MVETopic Advisor
Most Valuable Expert 2016

Commented:
If you don't know what commands do, try:

man <command>

Author

Commented:
worked

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial