I would like to how can i move a file to a directory (mv) but if in that directory there is a file with the same name it automatacly renames the file including .1 in the moving file name. For example:
I want to move file Test to the directory MyDirectory. But in MyDirectory there is allready a file with the name Test. After moving the Test file, the directory MyDirectory would have 2 files: Test and Test.1. If i would move another file with the name Test to MyDirectory it would end up like this: Test, Test.1 and Test.2.
I can't find a option on mv that would help me with this.
Thanks in advance.