Avatar of anishtv
anishtv
 asked on

copyfiles

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
Unix OSLinux

Avatar of undefined
Last Comment
anishtv

8/22/2022 - Mon
Gerwin Jansen

Try changing that .  to  *
Kent W

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

ASKER
Kindly update the final format.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Gerwin Jansen

>> 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 W

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

That will copy everything.
anishtv

ASKER
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
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
Gerwin Jansen

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
anishtv

ASKER
what is -ra means
Kent W

r = recursive, a = archive mode
Gerwin Jansen

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

man <command>
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
anishtv

ASKER
worked