search

Home  >  Q&A  >  body text

fish - linux mv file cannot be moved due to file name

I have a file in a directory that starts with -4. I want to move it. Maybe mv recognizes -4 as a parameter, and the result is

mv: invalid option -- '4'

I didn’t find a solution after I started manning, and I couldn’t find a solution through searching. Is it possible to just rename it?
Hope someone can answer
shell is fish

欧阳克欧阳克2791 days ago1087

reply all(2)I'll reply

  • 女神的闺蜜爱上我

    女神的闺蜜爱上我2017-06-24 09:44:40

    mv -- "-4" "target"

    reply
    0
  • 扔个三星炸死你

    扔个三星炸死你2017-06-24 09:44:40

    Just add the path

    reply
    0
  • Cancelreply