mv accident

24年 10月 21日 Monday
93 words
1 minutes

Learn from mistake

I accidentally press enter when typing command mv {firstfile,secondfile} and my intend is to write smth like mv {firstfile,secondfile} destination/.

and as a result, the secondfile is overwritten by firstfile.

Prevent it from happening again

It's a good idea to always comment an important command: # some command that need executed cautiously and go back by C-a and delete the comment with C-d.

thanks for IRC folks that suggest to make it a habbit, will do it from now :)

see bash(1), specifically under section Commands for Moving to get more details on default bash keybinding.

Title:mv accident

Author:ReYuki

Link:https://www.reyuki.site/posts/mv-accident [copy]

Last updated:


This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. You are free to share and adapt it, as long as you give appropriate credit, don’t use it for commercial purposes, and distribute your contributions under the same license. Provided under license CC BY-NC-SA 4.0