Welcome to WebmasterWorld Guest from 54.147.63.124

Forum Moderators: phranque

Message Too Old, No Replies

Copy files from one account to another on same server

via SSH the best way?

     
4:26 am on May 19, 2009 (gmt 0)

Junior Member

10+ Year Member

joined:May 18, 2005
posts:117
votes: 0


Hello, I need to copy 3,000+ files from one account to another account. The accounts are on the same server. Is doing this via SSH the best way? What command do I use to achieve this?

Thanks!

Emilio

6:19 am on May 19, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member dreamcatcher is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 30, 2003
posts:3719
votes: 0


Hi Emilio,

If you use a host, just get them to do it for you.

dc

7:39 am on May 19, 2009 (gmt 0)

Junior Member

10+ Year Member

joined:May 18, 2005
posts:117
votes: 0


dc,

I've got an unmanaged dedicated server. I can get someone to do this, but would also like to learn how.

Thanks,

Emilio

3:11 pm on May 19, 2009 (gmt 0)

Administrator

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 31, 2003
posts:12533
votes: 0


cp is the copy command. At the secure shell (SSH) prompt you can type "man cp" to learn more about the command.
3:55 pm on May 19, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 28, 2004
posts:7999
votes: 0


A caveat, if you're moving, for example, a demo from one location to another, or one client to another, you will also need to change ownership of those files.

Example:

Client's a's website is accessed via client_a, which is also the user/FTP client name client_a.

You move all of client_a's files to the domain of client_b.

client_a still "owns" these files, so client_b can't FTP over or modify them. You need to CHOWN all files and directories to client_b.

Furthermore, if you perform the cp command as root, the owner of client_b's files now becomes root. Again, you need to change ownership to the new client.

10:21 pm on May 19, 2009 (gmt 0)

Junior Member

10+ Year Member

joined:May 18, 2005
posts:117
votes: 0


Thanks coops and rockn.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members