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_3Xf9nreW45XSBGrstMsovnIX6tTe45Enk4 [destination]
getopt(3)
The interpretation of options in the argument list may be cancelled by
the option `--' (double dash) which causes getopt() to signal the end of
argument processing and return -1. When all options have been processed
(i.e., up to the first non-option argument), getopt() returns -1.
getopt(1)
The special
option `--' is used to delimit the end of the options.
We've been doing this for almost 50 years, you'll get use to it eventually.
Mik J <[email protected]> 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
> options
>
> What do you think about it ?
>