Re:I'm “still afraid to use spaces in file names” years old
by AnIdiotOnTheNet on Thursday November 11, 2021 @09:33AM
(#29188194)
It's almost like in-band signaling isn't a good idea or something.
Re:I'm “still afraid to use spaces in file names” years old
by kerblang on Thursday November 11, 2021 @09:33AM
(#29188199)
That sounds like... Puzzle time! I had to cheat, sort of, by looking at the man page:
> Local file names can be made explicit using absolute or relative pathnames to avoid scp treating file names containing ':' as host specifiers.
So `scp foo:bar user@host:~` fails because it tries to find the host foo. But `scp ./foo:bar user@host:~` works just fine. I feel kind of stupid for not guessing as much.
Re:I'm “still afraid to use spaces in file names” years old
by philote on Thursday November 11, 2021 @10:14AM
(#29188696)
Can't you usually just put quotes around the filename and/or path to prevent all those issues?
Edit: nope, just tried it and scp still sees the quoted filename as a host + path
Re:I'm “still afraid to use spaces in file names” years old
by warkdarrior on Thursday November 11, 2021 @12:19PM
(#29190448)
That is just lazy programming. If the input "foo:bar" is ambiguous, the program should try both interpretations (HOST:FILE and FILE) and then present the user with a prompt that provides sufficient information.
"Does foo:bar refer to the local file `foo:bar' (size: 102kB, date: 2021-11-11) or to the file `bar' on host `foo' (FQDN: foo.example.com, IP address: 1.2.3.4)?
1: local file `foo:bar'
2: file `bar' on remote host `foo'
Your selection: "
Re:I'm “still afraid to use spaces in file names” years old
by koheripbal on Friday November 12, 2021 @05:15PM
(#29205177)
WinSCP currently has a bug that crashes if it tries to sync a folder with a space in the name
I also love when you're using bash and you have a file with ! in the name, and you accidentally fail to correctly backslash it, you not only get "bash: !rest_of_filename: event not found", but it also fails to add that command line to the history, so you can't just hit up and fix it. You have to actually go to the mouse and copy and paste.