Re: scp doesn't work properly when the file name begins with a dash h

2022-12-17 Thread Mik J
Hello, Thank you both for your answers. Le vendredi 16 décembre 2022 à 01:59:41 UTC+1, Geoff Steckel a écrit : On 12/15/22 18:59, Mik J wrote: > Hello, > > I have a file named like this > -hh-6CP0_3Xf9nreW45XSBGrstMsovnIX6tTe45Enk4 > > and when I do a scp i have this output > scp: un

Re: scp doesn't work properly when the file name begins with a dash h

2022-12-15 Thread Geoff Steckel
On 12/15/22 18:59, Mik J wrote: Hello, I have a file named like this -hh-6CP0_3Xf9nreW45XSBGrstMsovnIX6tTe45Enk4 and when I do a scp i have this output scp: unknown option -- h I feel like there's a limitation because "scp * destination" shouldn't output an error, * is considered as files not

Re: scp doesn't work properly when the file name begins with a dash h

2022-12-15 Thread Theo de Raadt
This is a Unix 101 question. For all programs which use getopt(3) to parse arguments (which is nearly 100% of programs because POSIX mandates the behaviour), the options can be seperated from the non-options by using "--". So you would use the following; ie. scp [-options] -- -hh-6CP0_3Xf9nreW4

scp doesn't work properly when the file name begins with a dash h

2022-12-15 Thread Mik J
Hello, I have a file named like this -hh-6CP0_3Xf9nreW45XSBGrstMsovnIX6tTe45Enk4 and when I do a scp i have this output scp: unknown option -- h I feel like there's a limitation because "scp * destination" shouldn't output an error, * is considered as files not options What do you think about