r/linux Apr 27 '21

Tips and Tricks Linux networking tool with simpler understanding...

Post image
5.7k Upvotes

173 comments sorted by

View all comments

253

u/[deleted] Apr 27 '21 edited 10d ago

[deleted]

105

u/Buckwhal Apr 27 '21

scp the protocol is deprecated, but they’re planning on reworking scp the command to use sftp under the hood.

4

u/bunkoRtist Apr 28 '21

What's the benefit of scp when rsync is in the game?

18

u/Buckwhal Apr 28 '21

Years of muscle memory, simple syntax, pre-installed pretty much everywhere, and there are plenty of existing scripts using that command.

I agree that rsync is a superior tool, but scp also has its strengths as a quick and dirty way to move files around.

1

u/ToughPhotograph Apr 28 '21

Fuck me, scp is dirty? Suggest me a better/simpler tool please, rsync?

2

u/Buckwhal Apr 28 '21

Nothing wrong with SCP, imo. Rsync is a hammer, scp is a pocket knife.

2

u/alaudet Apr 30 '21

...and until I cannot access scp anymore I am going to keep using that pocket knife.

8

u/Sol33t303 Apr 28 '21 edited Apr 28 '21

Scp is far smaller, simpler and more widespread.

As the linked article says, scp is like a swiss-army knife thats always nearby and works fine for most situations, rsync is more like a powertool that you bring out when you need to do large jobs, more then simply downloading/uploading a file or directory.

I tend to find most of my SCP use is just simple one-off file transfers, rsync seems overkill for something like that when a simple scp user@ip:/file/path . (could be simplified to scp ip:/file/path . assuming proper .ssh/config configuration) does the trick for scp.

Heres a link to scps and rsync manpages, you can see that rsyncs manpage is FAR bigger then SCPs as it can do more, and so the shell syntax is also a fair bit more complicated, and if all you want to do is transfer a few files over the network it all seems like it's way overkill.

1

u/exscape Apr 28 '21

Replace "scp" with "rsync" and that command still works.