1

When I have a file named -19-5-20674., how can I delete that file?

When I use sudo rm:

$ sudo rm -19-5-20674.
rm: invalid option -- '1'
Try 'rm --help' for more information.

What can I do?

0

1 Answer 1

2

have a try withsudo rm ./-19-5-20674. or with sudo rm -- -19-5-20674.

your sudo reads the filename due to it's leading dash as an optional parameter / command option. most shells understand a double dash to signal end of command options. i circumvent this with a relative path as shown.

Not the answer you're looking for? Browse other questions tagged .