GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   copying files on a server question (https://gfy.com/showthread.php?t=975467)

Mutt 06-28-2010 07:46 AM

copying files on a server question
 
i'm trying to copy files from one location to another on a server - not move them, copy them. problem is it is taking forever to copy these files which are ~100-200MB
i'm using a piece of software called WinSCP - if I used the Unix copy command would it be faster?

awxm 06-28-2010 07:51 AM

Yeah just use cp command in ssh, much quicker.

GotGauge 06-28-2010 08:03 AM

Have your Host do it!

HomerSimpson 06-28-2010 08:56 AM

ssh + midnight commander :thumbsup

Klen 06-28-2010 08:59 AM

I usually use scp or sftp console commands to do transfers server to server.

bja 06-28-2010 09:23 AM

If you are logged into a server and transferring files on the same server, you have two decent choices: cp and ln.

cp copies the files as you'd expect. In WinSCP, a local copy on the server likely uses the cp command itself (or a close derivative of it) and thus performance will likely be the best that it can be.

ln can create either a "hard" or a "soft" link.

A hard link is another name for your file and retains the same low-level information. If you have a file namd "test" and use "ln test othertest" a file named othertest will show up in the current directory. If you delete either test or othertest, your file will still exist. (Under the hood, a hard link increases the number of references to a file, and a file is accessible as long as at least one reference exists.) This provides some amount of protection from deletes, especially if you make hard links in a different directory. Changes to either test or othertest will be reflecting in each file. The advantage of this method (especially if you are just looking to provide some protection from overzealous rm usage) is that it's super fast. The disadvantage is that it isn't a true copy.

A soft link is another name for your file, but it is in name only. The link points to another file, and the link itself isn't a real reference to the file (reference as understood by the operating system). This means that if you do a "ln -s test othertest", your othertest will point to test. If you delete test, otherwise will become a broken link (probably displayed as red if you are on a terminal that supports colors). If you delete othertest, test will still exist, since you are only deleting the link, not the file itself.

If you are moving files between two computers, i.e. your pc and your server, WinSCP will attempt to use either scp or sftp (technically, it uses the putty implementations of these). The scp/sftp protocols incur generally negligible overhead on moderns computers (this is actually just an ssh connection with a special set of commands sent over it to mimic UNIX rcp and UNIX ftp). Other common options include FTP (if you choose FTP, make sure to use an SSL-secured FTP server) and rsync (which is generally run over an encrypted ssh connection, but doesn't have to be).

If you are simpy moving files around on the server, it might be worth thinking about what level of copying you need. If you don't need a fully copy, ln or ln -s (hard and soft links) provide a far faster alternative that may meet your needs.

BestXXXPorn 06-28-2010 09:24 AM

SCP is SecureCoPy and it's meant for transferring files across a wire... So in effect you're probably transferring it to your local computer and then transferring it back to the remote server.

Like FruitPanda said, you should just SSH into the box and use the cp command which is CoPy... That way everything stays local to your box. I recommend using PuTTY. It's free and works great... if you're on OS X just use terminal...

If you've never used ssh here's a couple things to help you out:

cd = change directory (just like in DOS [back in the day])
ls = list ... list the files in a directory
cp = copy

and for any command, you can type:

command --help (usually) and it'll display usage information. If it doesn't you can use

man command (usually) and it'll display the manual information for that command.

Those few things should at least let you get in there and move your files around.

Good luck!

Mutt 06-28-2010 05:02 PM

Quote:

Originally Posted by BestXXXPorn (Post 17284920)
SCP is SecureCoPy and it's meant for transferring files across a wire... So in effect you're probably transferring it to your local computer and then transferring it back to the remote server.

Like FruitPanda said, you should just SSH into the box and use the cp command which is CoPy... That way everything stays local to your box. I recommend using PuTTY. It's free and works great... if you're on OS X just use terminal...

If you've never used ssh here's a couple things to help you out:

cd = change directory (just like in DOS [back in the day])
ls = list ... list the files in a directory
cp = copy

and for any command, you can type:

command --help (usually) and it'll display usage information. If it doesn't you can use

man command (usually) and it'll display the manual information for that command.

Those few things should at least let you get in there and move your files around.

Good luck!

yeah that's what i figured WinSCP was doing

i used Putty and the copy command

thanks for the replies and help


All times are GMT -7. The time now is 12:17 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc