mv command to replace files

Advertisement

move
Guest

mv command to replace files

I am giving 'mv' command to transfer files. But if file already exists, it gives error. I want to overwrite file, if already exists. How to do this with 'mv' command?

Reply with quote

Advertisement

ryc
Guest

Re: mv command to replace files

martin wrote:

You cannot rename file to name of an existing file.

So, is there a way that I delete previuos file if exists, and mv the file. I have to move the file via script else it stays there in original directory.

Reply with quote

Advertisement

You can post new topics in this forum