I am moving a file from /tmp/ folder to another path. I am using "rename" function to move file to another path. But rename returns -1 and errno = 18 (Invalid cross-device link). Error no 18 means: "The directory containing the name newname must be on the same file system as the file (as indicated by the name oldname)"
Can someone suggest a way to move this file.