1

While editing I saved a file as file.p;l instead of file.pl. Now when I try to rename it this happens:

$ mv file.p;l /home/mc/file.pl
mv: missing destination file operand after 'file.p'
Try 'mv --help' for more information.

How can I rename filename in CLI?

Guest
  • 11

1 Answers1

-1

Just use quotes: mv "file.p;l" /home/mc/file.pl

  • Using a comment from someone else, copy-paste it to an own answer without attribution (and even without some formatting) on a question that is currently close-voted as duplicate is not very nice. – pLumo Apr 17 '19 at 07:32
  • 1
    @RoVo Using someone's comment in an answer is fair play. G-Man did not make a real answer out of it. This answer, however, lacks proper formatting and the explanation as to why it works. The explanation is in the answers to the dupe question, which makes this answer superfluous, unless it adds something novel. – Kusalananda Apr 17 '19 at 08:09
  • Fair enough, no explanation in my answer. The formatting of my answer is up to me - not you. If it was a more involved answer I would have formatted it. I actually just copied the OPs question and added dbl quotes. Pretty self explanatory. – Terry Wendt Apr 17 '19 at 08:17
  • @TerryWendt Sorry, but the formatting of questions and answers is up to whoever feels they can improve on them. See https://unix.stackexchange.com/help/editing – Kusalananda Apr 17 '19 at 08:21
  • Sorry, I just don't appreciate people that troll through posts harassing other people. And I don't like being called a thief. And I had no reason to attribute anything to anyone. – Terry Wendt Apr 17 '19 at 08:26
  • @Kusalananda I did go read the page you linked to, and the edits made to my answer don't seem to meet the requirements of that page. I quote: "Edits are expected to be substantial". Formatting a tiny one line answer, and then calling the person who posted the answer a thief is just rude. – Terry Wendt Apr 17 '19 at 08:36
  • @TerryWendt That exchange of comments has already been dealt with. You should properly attribute sources of text that you copy, unless it's a comment in which you attribute if you feel like it. This is explained here. You got two edits to your answer from experienced users that changed both formatting and semantics, and you reverted them. This is within your rights, and I have no issue with that. – Kusalananda Apr 17 '19 at 08:54