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.
|