 You don't have to be a web developer to come across a situation where you need to transfer a file or a directory from one destination to another, either on your own network or on another network somewhere across the world. That situation isn't exclusive to people who do web development. It's not exclusive to people who manage servers. Even if you're just a person who uses virtual machines, this situation can come up very often. So what I wanted to do today was talk about a few applications that you can use to transfer data from one place to another on Linux. So as you might expect, there are many different ways of doing this. I'm only going to cover five programs today. So if none of these five suit your fancy, there are probably other ways of doing this that might be worthwhile exploring. So let's go ahead and jump in. So the first one on the list is good old faithful R-Sync. Now R-Sync, I've covered on the channel before. I'll link to that video in the video description and in a card if I remember to do so. Basically, what R-Sync does at its basic form is transfer files from one place to another. So it makes sense that it also has the functionality to do this remotely. So if you wanted to transfer from your main machine to a server, you know, in the cloud somewhere or a virtual machine or whatever, R-Sync can do that just as easily as it could transfer a file from your main machine to an external hard drive. It's basically the same idea. The only difference is that you're giving a destination that doesn't reside on your main machine. So in the B-roll, you'll see me transferring a file from my main machine to a virtual machine. It's just a matter of giving the file or directory that you want to transfer, the username of the remote machine that you're transferring to, the IP address of the remote machine you're transferring to and the destination directory where you want to store the file that you're transferring. That's simple. It's really that simple. Obviously, you're going to need the credentials to do this. So you'll need to enter a password and it should just transfer very, very simply. And you'll obviously need R-Sync installed on the host machine. So the syntax for this is very simple. The benefits of using R-Sync over all the rest of them that I'm going to cover today is that it's R-Sync. R-Sync has a ton of options for you and any option that you were able to use to back up your system from your main machine to an external hard drive, you can also use that with the remote functionality. So if you wanted to use dash-delete or dash-a or dash-fee or whatever, any of the hundreds of flags and options that R-Sync has available to you can be used in this manner too, which means that it gives you a ton of options for manipulating the thing that you're transferring, but also manipulating the data in the destination folder. So if you wanted to have Delta upgrades to a backup on a server, you could set that up really easily with R-Sync just as you would to set up Delta backups on an external hard drive. So R-Sync is super powerful, which means that you can do a ton of stuff with it, even if the destination doesn't reside on your network. So that is R-Sync. The next one on the list is SCP. Now, SCP is a program that I've been using now for a couple of weeks. And what I've found is that it's probably the fastest way of transferring files and directories from one place to another. It is astonishingly fast. And you'll see this in the B-roll as we go along, if I can get it in there. The basic idea and the syntax is actually fairly similar to R-Sync. You just give it the URL and the directories that you need to transfer and the username of the remote server that you're transferring to. And then you enter your password and it transfers the files. It's really as simple as that. It seems to be best for transferring individual files or directories to an individual file or directory. It doesn't have all of the fancy bells and whistles that R-Sync does. So it's not probably the best for backups, but transferring individual files to and fro, it does a fantastic job of. And its main feature for me has been speed. So as you'll see in the B-roll, one of the directories that I transfer over has about seven movies in it. And I'm talking multiple gigabytes of high definition movies, crappy movies. I'm sure you'll probably think so, but I like crappy movies. And basically what it does is it transfers them probably all of those gigabytes of movies. It transfers them in maybe 10, 15 seconds. That's how fast it is. It's astonishingly fast. It transferred that entire directory, not only with the movies, but everything else that was in there, which is also multiple gigabytes, within less than a minute. Like it's really super fast. So SCP has actually been my favorite way of transferring files from my main machine to my virtual machines over the course of the last few weeks, simply because it is just super, super fast. Now, the next one on the list is SFTP. Now, SFTP is a file transfer protocol, as you might expect from the name. And it's a secure file transfer protocol. And this is one of the ones that I'm not as familiar with as I'm the rest. I haven't used SFTP or FTP for anything truly magnificent in many, many years. Way back when I was aspiring to be a web developer, which did not last all that long. It was like when I was in college, you know, I used it for a little while, but I've never really used it full fledged for anything significant. But a lot of people swear by SFTP because it is very, very simple. It's just a matter of entering SFTP and then the IP address of the remote server that you want to access, entering the credentials for the username that you want to access. And then you have access to the file system of that entire computer. That's really the basic level of it. But what makes SFTP different than, say, SSH, it's much easier to get things off of your remote server with SFTP. The idea is to actually transfer files where SSH is simply to kind of explore the remote file system. SFTP, it has commands to get and push files and directories from that particular file system to the host machine. So you can see in the b-roll where I use get a certain directory, it would actually transfer that directory from the SFTP server that is connected to to the host machine. And another thing that SFTP allows you to do is it allows you to navigate between directories on your host machine so that you can choose where you're saving or pulling the stuff into from the server. So it basically allows you to access a remote server in an SSH like manner, but with the ability to transfer files to and fro. So SFTP is really very easy to do, but it's also somewhat more complicated than the rest of them that are on this list simply because you do have to worry about permissions. And you'll see this in the b-roll. If your user that you're connecting to via the link between the two computers doesn't have the permissions to access the files, you won't even be able to list the files out. So even if you do like if you'll see I try to to CD into my home directory on the remote server and then I do an LS and it says permissions denied. And that's because the user on my main machine does not have permissions on that remote server. So if you're going to use SFTP, you'll want to make sure that you've set up your user in such a way that you have access to all the files that you're going to want to transfer to and fro. So just make sure that you have those permissions set up. Honestly, out of all of the ones that I'm going to talk about today, SFTP is the one where permissions play the biggest role. So that is SFTP. It's not my favorite. SCP is the one on this list that I use the absolute most of and that's because it's really, really good. So SFTP is very powerful, but it's not my favorite, but it's still really good. So if you need to have access to it and I'm sure I'm sure there's someone out there who's much more knowledgeable and SFTP who could tell you why SFTP is better than SCP or, you know, SSHFS or NFS or any of the other ones that are out there. But that's not me. I just know the bare minimum of SFTP. So just keep that in mind. There might be more powerful uses of it other than transferring just one or two files. So that's SFTP. OK, so the next one on the list is one that I actually haven't used at all. And that's just because I just found out about it in the last few hours. But I wanted to mention it here because I've been told by people that I trust that is very good. And that is NFS. I don't know anything about it other than it is supposedly an alternative to SSHFS, which I covered a couple of weeks ago. Now, if you remember, SSHFS basically allowed you to SSH into a server or a remote client or whatever, either way. And it would allow you to mount that file system or that directory or whatever on your host machine. That's what SSHFS does. NFS is an alternative to that. And I haven't looked much into it, although I will say that the warnings on the ArchWiki scare me a little bit. I'm not sure if those are up to date. I'm told that they are not. So we'll see. Basically, the ArchWiki says that you have to have your username and user group exactly the same on both client and server. It also says that it's not encrypted. So I'm I've been told that both of those things have been solved in recent versions of NFS. So if that's true, those are no longer, you know, a problem. And that would make it much more interesting for me. So that's something that I'm probably going to look into in the future. I did want to just include NFS on the list simply because I have been told that it's really good. So the last one on the list is actually two. So I'm going to combine these two just a little bit. The first one is SSH. SSH isn't really a protocol to transfer files from one place to another. It's actually just remote access. So that's the reason why that doesn't take place just on the list. You know, there are probably ways of transferring files from just SSH. I'm sure there is. But really what I wanted to talk about here was SSHFS. SSHFS has been abandoned. So I don't want to belabor the point because it is an abandoned project, but it is so very, very good. And it still works. So I'm putting it on the list nonetheless. Basically, as I explained here a minute ago, what it allows you to do is over SSH, you can designate a directory on a remote server somewhere, whether it's a virtual machine or an actual server somewhere, and then mount it on your host machine. So you have full access to whatever directory you mount. So you can mount your entire root structure if you wanted to do that, which would give you access to everything on that remote server. Or you could just mount your home directory or whatever. So it'd be very easy just to access your personal files. Whatever you want to do, it's very simple and it works phenomenally well. It's worked so very good. It is a little slow and, like I said, it is abandoned. So it's not going to ever be updated again, which is a crying shame, but it's still one of my favorite ways of accessing data from one place to another. It just really does work very well. And the last one on the list is very similar to that only. It's still maintained and it is a protocol that a lot of people use. And that is SAMBA. Now, I saved SAMBA for last because they don't have a lot to say about it. In fact, I don't even have any b-roll for you because I refuse to use it. SAMBA, and I've talked about this before, is a protocol slash technology that actually hates my living guts. Like it doesn't... I've been told that I'm doing it wrong and I'm sure that that's the case. But every time I've tried to set up SAMBA and I have been successful many times before, eventually I usually get it, but it's always a pain in my ass. It is so bad. I say it's so bad, but it's also so good. Now, technically, SAMBA, from what I know, was developed to share files and directories between Linux and Windows. So this is something that's supposed to be a cross-platform technology. It was never meant to be from Linux to Linux, although it does supposedly work that way just fine. And that's the way that I would always use it because I don't use Windows. So maybe the reason why I've always had so many problems with it is because of the whole me not using Windows thing and it works better on Windows. I don't know if that's the case. I mean, I'm not going to go install Windows just to try it out. So I guess I'll just have to live in the dark in this situation. But SAMBA, I didn't actually put this on here just to complain about SAMBA. SAMBA, in theory, if you can get it up and running, is a fantastic way of transferring files from one place to another because you can set designated files and directories as being permanently shared inside of the configuration. And then every time you connect to your SAMBA share via a file manager or whatever, you can access the files that you have shared. So if you wanted to share your documents folder on your remote server or whatever, you could do so. And then every time you opened up Thunar, you could connect to it very easily. And because it is the way it is, you can set it up so it is user verified so you're forced to sign into it. So it's very, very secure. It also is not as hard as I'm actually making it to seem in theory. Now, I say in theory because it always messes me up, but I'm an idiot. So don't, you know, don't take my experiences as the way it always is. In theory, setting up SAMBA is very easy. It's just a matter of installing it, starting the services, giving your user permission to the group that it needs to be accessed to, you know, and then setting up the configuration file. Those are the steps to the thing. And I have a video on how to do it if you wanted to go search for that. I think it's one of the first videos I ever did. So if you think the quality now is bad, good boy. Whoa, boy. It's, you know, not very good, but it exists. I never pulled down those early videos, so you can go check that out if you really want to. So those are the tools that are phenomenal for transferring files to and fro, and they each have their uses. SAMBA is probably the best GUI solution, even though you had set it up in the terminal. Once you've set it up, you could access it via a GUI file manager and you never have to worry about it again. It's really the only GUI option out there other than GUI front-ends for R-Sync, right? Well, that's not true. You could use SFTP with a GUI client, like FileZilla or something like that. So I think that exists. SCP, I think it's only in the terminal. I don't think that there are any front-ends for SCP. I might be wrong about that. So if I am, correct me in the comment section below. And obviously, GR-Sync exists for R-Sync. So there are GUI options if you don't wanna use the terminal options for any of these programs. So if you have thoughts on file transfer protocols and file transfer technologies, leave those in the comment section below. Let's be nerds together, you know? It's just, I know this is a very nerdy topic, but you know, what are you gonna do? That is it for this video. You can follow me on Mastodon or Odyssey. Those links will be in the video description. You can support me on Patreon at patreon.com slash the Linux cast. Links for Liberapay and YouTube will be in the video description as well. I don't think that the Liberapay one will be there for very much longer. I'm not quite happy with Liberapay, but that's for a topic for another day. Anyways, that's it for this video. Thanks to everybody who does support me on Patreon and YouTube. You guys are all absolutely amazing without two of the challenges or something anywhere near where it is right now. So thank you so very much for your support. I truly honestly do appreciate it. You guys are all absolutely amazing. Thank you so very much. Thanks everybody for watching. I'll see ya next time.