3 ms·
Here may be the right place to ask: How do you browse for scp? I rarely can remember the full path to the file I need so I end up with two terminals: one for s
by ZoomZoomZoom 6y ago
Here may be the right place to ask:
How do you browse for scp? I rarely can remember the full path to the file I need so I end up with two terminals: one for ssh browsing and one for copying with scp/rsync. I feel I'm doing something wrong here.
- Lex-2008 6y agoI do pretty much the same, although in single terminal: `pwd` and `ls` on remote machine to print dir and file name, then exit ssh and edit recent ssh command to pull the file copypasting recent `pwd` and `ls` output. Luckily, I have to do it very rarely. When doing some more serious file-shuffling - I resort to graphical file managers. Which is, well, even worse than two terminals in this regard :)
- moonshinefe 6y agoMight just be easier to use sftp then depending what options you need. You can ls and get/put files from a command prompt like interface and it uses the ssh protocol as well.
- acdha 6y agoEnable OpenSSH’s control master feature to reuse connections and it’s fast enough to use tab completion.
- voqv 6y agoYou can have tab autocomplete working if you're using ssh keys and you have their passphrases unlocked with a keychain/ssh-agent.
- Timpy 6y agoI spend my entire work day in the terminal so remembering the full paths of things has become second nature without much effort. If you just drop into the terminal occasionally for file transfers then there's nothing wrong with opening a second terminal to get the paths you want.
- deleted 6y ago[deleted]
- nikanj 6y agoIn that use case I use sftp
- cheese65536 6y agoAlso, what is the correct way to use scp copy remote files with a space in the name? I usually end up just using wildcards (or rsync), but that can behave incorrectly with similarly named files. $ touch '/tmp/test file' $ scp localhost:'/tmp/test file' . scp: /tmp/test: No such file or directory scp: file: No such file or directory $ scp localhost:'/tmp/test?file' . test file 100% 0 0.0KB/s 00:00 Edit: I'll answer my own question, which I clearly never thought about much, since the answer is obvious. I need to escape the space within the string. $ scp localhost:'/tmp/test\ file' . test file 100% 0 0.0KB/s 00:00
- ddalex 6y agoremote path autocomplete works for me in bash.... it's magic