I like it! But for me ssh already provides a simple and secure way to move files from one place or another.. tar -cf - ./files.txt ./orDir/ | ssh host "(cd /dest/dir; tar -xf -)" Given that ssh it so ubiquitous I think this will always be my go to.
Transfer.sh – File sharing from the command line
61–70 of 117 posts
Re: Transfer.sh – File sharing from the command line
#62Earlier quoted context omitted.
What about good old scp? scp file.txt user@host:/dest/dir/
Or rsync? rsync -zvh file.txt user@host:/dest/dir/ So many ways to do this :)
rsync -n -avh --progress source destination:~/asdf/ for a dry run followed by ctrl-p, ctrl-a, alt-f, alt-d, alt-d to remove the -n flag and then execute that for the real thing.
Occasionally though, I'll also use sftp if I'm just pulling one thing - perhaps even after sshing to the remote machine.
For all of these, SSH keys should be set up (and desktop logins secured) to make life easier.
As for Android, adb push and adb pull -a seems to work better than mtp:// or AirDroid in my experience.
Re: Transfer.sh – File sharing from the command line
#63Btw, many unix files explorer can connect to many remote servers via ssh. Unless x less of course. All is integrated, local programs can read and edit those files as regular, drag and drop, folder, permissions with right click. I use the shell a lot, but remote bookmarks are wizardry!
Re: Transfer.sh – File sharing from the command line
#64Re: Transfer.sh – File sharing from the command line
#65I like it! But for me ssh already provides a simple and secure way to move files from one place or another.. tar -cf - ./files.txt ./orDir/ | ssh host "(cd /dest/dir; tar -xf -)" Given that ssh it so ubiquitous I think this will always be my go to.
You should use '&&' instead of ';' on the host side. That way you don't accidentally dump your transfer contents into a wrong directory if the existing host dir doesn't exist.
e.g.: tar cf - stuff | ssh host "(cd /dest/dir && tar xf -)"
Re: Transfer.sh – File sharing from the command line
#66I like it! But for me ssh already provides a simple and secure way to move files from one place or another.. tar -cf - ./files.txt ./orDir/ | ssh host "(cd /dest/dir; tar -xf -)" Given that ssh it so ubiquitous I think this will always be my go to.
:-D
> tar -cf - ./files.txt ./orDir/ | ssh host "(cd /dest/dir; tar -xf -)"
:-O
Re: Transfer.sh – File sharing from the command line
#67Re: Transfer.sh – File sharing from the command line
#68Earlier quoted context omitted.
I love magic wormhole, you give the recipient three words and a number and the file is sent peer-to-peer. No messing about with routing or anything.
How is it for getting around weird networks (double NAT, etc)?
> This library includes the URL of a public rendezvous server run by the author. Application developers can use this one, or they can run their own (see the https://github.com/warner/magic-wormhole-mailbox-server repository)
> For now, bulk data is sent through a “Transit” object, which does not use the Rendezvous Server. Instead, it tries to establish a direct TCP connection from sender to recipient (or vice versa). If that fails, both sides connect to a “Transit Relay”, a very simple Server that just glues two TCP sockets together when asked.
If I understand the docs correctly, it always uses a centralized server to establish the transfer. Once the transfer is established, it'll attempt to transfer the files directly, if possible, but if not, it'll fall back to using a relay.
And so many people are trapped behind NAT these days, I don't know that the need for this will be all that unusual.
Re: Transfer.sh – File sharing from the command line
#69I like it! But for me ssh already provides a simple and secure way to move files from one place or another.. tar -cf - ./files.txt ./orDir/ | ssh host "(cd /dest/dir; tar -xf -)" Given that ssh it so ubiquitous I think this will always be my go to.
If you can trust to have gnu tar on both side, you can reduce typing. I usually do: tar c files.txt orDir | ssh -C host tar x -C /dest/dir
-h for human-readable numbers -a for archive mode -v and --progress for verbose info -z for compression during transfer
Add a -n for a dry run if required.
https://linux.die.net/man/1/rsync
One of the people who came up with it - Andrew Tridgell - was more or less "responsible" for Linux and BitKeeper parting ways, which in turn ultimately lead to the creation of Git. I think it's a fascinating story. Excellent tools.
The progress / speed display is the main thing that keeps me coming back to rsync even though other tools might manage the same job - not seeing the progress of a copy is what had me searching for that solution in the very first place.
Re: Transfer.sh – File sharing from the command line
#70I like it! But for me ssh already provides a simple and secure way to move files from one place or another.. tar -cf - ./files.txt ./orDir/ | ssh host "(cd /dest/dir; tar -xf -)" Given that ssh it so ubiquitous I think this will always be my go to.
> tar -cf - ./files.txt ./orDir/ | ssh host "(cd /dest/dir; tar -xf -)" You should use '&&' instead of ';' on the host side. That way you don't accidentally dump your transfer contents into a wrong directory if the existing host dir doesn't exist. e.g.: tar cf - stuff | ssh host "(cd /dest/dir && tar xf -)"
tar -C /dest/dir -xf -