Link to home
Start Free TrialLog in
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
Avatar of Gerwin Jansen
Gerwin Jansen
Flag of Netherlands image

Try changing that .  to  *
When in doubt, pump in the full path. I'd stick the recursive flag on that, too. (-r)
Avatar of anishtv
anishtv

ASKER

Kindly update the final format.
>> 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.
cp -ra /path/to/source/* /path/to/target/

That will copy everything.
Avatar of 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
ASKER CERTIFIED SOLUTION
Avatar of Gerwin Jansen
Gerwin Jansen
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of anishtv

ASKER

what is -ra means
r = recursive, a = archive mode
If you don't know what commands do, try:

man <command>
Avatar of anishtv

ASKER

worked