ctr*_*l-d 11
查看 EXDEV 错误(在 man 2 rename 中):
Run Code Online (Sandbox Code Playgroud)EXDEV oldpath and newpath are not on the same mounted filesystem. (Linux permits a filesystem to be mounted at multiple points, but rename() does not work across different mount points, even if the same filesystem is mounted on both.)
你不能通过系统调用在文件系统之间移动,所以 mv 所做的是用户空间复制和删除,这从来都不是原子的。