Bash – mv – how to escape backslash in file name

bashcommand line

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

Best Answer

You need to escape the backslash:

mv \\Dockerfile Dockerfile
Related Question