Move files beginning with an hyphen

This one is easy, as escaping does not work you have to prefix the filename with two hyphens like so:

mv — -some_silly_filename_with_an_hyphen_before_it

technorati tags:, ,

~ by princ3 on August 19, 2007.

2 Responses to “Move files beginning with an hyphen”

  1. You can also just do this:

    mv ./-some_silly_filename_with_an_hyphen_before_it

    Unless you are just passing in a filename that might not be in the current directory.

  2. thank you, sometimes you miss the wood for the trees :)

Leave a Reply