Comment by Towaway69
19 hours ago
On Mac you can use pbcopy to copy something your pasteboard aka clipboard.
So the first command becomes:
tar -cz dir | base64 | pbcopy
19 hours ago
On Mac you can use pbcopy to copy something your pasteboard aka clipboard.
So the first command becomes:
tar -cz dir | base64 | pbcopy
And of course you can use pbpaste for the inverse. Doesn’t work over SSH though, which is almost certainly how you’d be using this.
True that unless ssh tunnels the pasteboard nowadays ;)
GP was doing this using GUI and TUI so it's a case of having two terminals open to two different machines I assume.
> GP was doing this using GUI and TUI so it's a case of having two terminals open to two different machines I assume.
Yeah, but that’s exactly the case where it won’t work. pbcopy and pbpaste run locally, so if you’re connected to a remote Mac they won’t work properly (they will just cut/paste to the remote machine’s local pasteboard), and if you’re connected to a non-Mac the commands won’t exist at all. The only case where they would work is, say, connecting from one Mac to another via something like VNC that does do pasteboard sharing, and you’re trying to copy a file structure from a remote system to a local one. If you’ve got two terminal windows open to two different machines, you’ll have to cut and paste manually.