unix mv command without overriding existing files

Per default, mv will override existing files with the same name. To rename existing files with the same name instead, use the backup parameter.
mv --backup=numbered
The resulting file name pattern is [filename].[extension].~[number]~, e.g. image.jpg.~1~. Note that these files can be recognized as recycle or backup files by mistake. In this case they might be hidden by your file manager.
Share itShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

Leave a Reply

Your email address will not be published. Required fields are marked *