[Errno 18] Invalid cross-device link using os.rename

Scott Whitney justscott at gmail.com
Mon Feb 14 15:48:44 EST 2005


oldName=/backup/backups/data/WWW_httpd.conf_backups/20050204.httpd.conf

newName=/backup_old/data/WWW_httpd.conf_backups/20050204.httpd.conf

os.rename(oldName,newName) gives:

OSError: [Errno 18] Invalid cross-device link

mv from the shell works fine.

This is Python 2.2.3 from RedHat 9.0.

Any suggestions (other than os.system('mv %s %s')?)




More information about the Python-list mailing list