how to copy folder and paste in another directory

chaitu chaitu
chaitu chaitu used Ask the Experts™
on
some sub directories r there in the applications folder c:/oc4j/j2ee/home/applications;

i wanted to copy applications folder and pasted in home directory  and rename to node1.how to do it?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2006
Commented:
Hi chaituu,

cp -R /oc4j/j2ee/home/applications ~/node1

I presumed that C: was typo - since this is Linux TA
Cheers!
sunnycoder

Author

Commented:
"I presumed that C: was typo - since this is Linux TA"

yes

to run the above command i have to come upto this directory /oc4j/j2ee/home
Top Expert 2006

Commented:
Hi chaituu,

You do not have to change directories to execute this command
cp -R /oc4j/j2ee/home/applications ~/node1

Absolute path for source and destination have been specified ... ~/ refers to home directory.
Cheers!
sunnycoder
How to Generate Services Revenue the Easiest Way

This Tuesday! Learn key insights about modern cyber protection services & gain practical strategies to skyrocket business:

- What it takes to build a cloud service portfolio
- How to determine which services will help your unique business grow
- Various use-cases and examples

Author

Commented:
i am using SSH ;can i run this command like this.

[usernamexxx@servernamexxx /]# cp -R /oc4j/j2ee/home/applications ~/node1
Top Expert 2006

Commented:
Yes you can

Commented:
hi if you want to copy from a remote server then you need to use "scp" than cp.

if it is from a remote machine to your local machine then use

scp -r x.x.x.:/oc4j/j2ee/home/applications     /path/to/local/directory

where x.x.x.x is the ip address of the server FROM which you want to copy.

if it is from within the server then you need to do only a cp.

goutham

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