we are using tarFile library of python to untar the set of given files to the target directory.
tarGzipFile = tarfile.open(fileName)
tarGzipFile.extractall(targetDir + '/')
Here if same file exists in more than one tar.gz file then the file is over writing in the target directory. How can i change my code to avoid the overwrite? and also looking for the option similar to tar --backup none or numbered...so that if file exists then it prefix with ~ or add number at the end.