I copied a file to my Ubuntu vm with a backslash in the name, and I cannot figure out how to rename the file, e.g. mv .\Dockerfile Dockerfile -- the command line does not like that syntax for the filename but I'm not sure how to escape the .\Dockerfile


You need to escape the backslash:

mv \\Dockerfile Dockerfile
  • thanks mv .\\Dockerfile Dockerfile worked, although tab completion kept wiping it out, probably my terminal's fault – riqitang Mar 13 '18 at 20:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.