bashfile-rename

How to rename file with bash by adding first symbol - dot?


I would like to rename my file from myscript.js to .myscript.js. How can I do it with bash? I've tried different options like mv myscript.js \.*, but it doesn't work. I've tried to experiment by adding non-dot symbol like - mv myscript.js m*, but now I don't even know where my file is (of course, I have a copy ;).


Solution

  • You're trying too hard.

    mv myscript.js .myscript.js