Take care what name you give to the file or directory that the file or directory is being moved to.

If you choose the name of a file or directory that already exists it will be replaced by the file or directory that has been moved to its name!

To avoid this ...

Always use the mv command together with its -i option. This will prompt you for confirmation whenever the moved file or directory would overwrite an existing file or directory.

**The i option is not available with some versions of the command.**

Check the manual page for the mv command on your system.

[Home] [Search] [Index] This site maintained by unixhelp@hardrock.org