Welcome to WebmasterWorld Guest from 54.163.94.5

Forum Moderators: bakedjake

Message Too Old, No Replies

Linux Folder Copy command?

     
2:41 pm on Apr 15, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:Aug 23, 2004
posts:86
votes: 0


I have a folder in my Linux hosting account (I have ssh connection to the server) same as

\newversion\files

I need to copy this to

\public_html\files

But I already have the old version files under the \public_html\files folder.

Can you please tell me the command in Linux to do this task?

3:01 pm on Apr 15, 2006 (gmt 0)

Full Member

10+ Year Member

joined:Oct 15, 2003
posts:276
votes: 0


You can use 'mv \newversion\files \public_html\files'

This will copy all the files from the source directory to the destination directory. If you wanted to copy just one file from one directory to another, you could use 'cp'

3:38 pm on Apr 15, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Aug 11, 2004
posts:1014
votes: 0


mv MOVEs the source files to the specified destination.

cp COPYs the source files to the specified destination.

For more information, try:

man cp

and

man mv

Matt

11:24 pm on Apr 27, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 20, 2004
posts:1477
votes: 0


Matt's idea is best (learn all you can!) ...

In the meantime:

cp -r /original/dir /copied/dir