uutils/coreutils

mv Cross-Device Symlink Fallback EEXIST

已關閉

#10,010 建立於 2026年1月3日

 (0 則留言) (0 個反應) (0 位負責人)Rust (1,976 個分叉)batch import
U - mvgood first issuereported-canonical

倉庫指標

星標
 (23,854 顆星)
PR 合併指標
 (平均合併 5天 23小時) (30 天內合併 239 個 PR)

描述

Component

mv

Description

When moving a symlink across filesystems onto an existing destination path, uutils mv fails instead of replacing the destination like GNU mv does.

Test / Reproduction Steps

On filesystem A (e.g. /tmp), create a symlink:
$ ln -s /etc/passwd /tmp/src_link

On filesystem B (e.g. /home), create an existing destination:
$ touch /home/$USER/dst_exists
$ coreutils mv /tmp/src_link /home/$USER/dst_exists
  • GNU: dst_exists has been replaced with src_link.
  • uutils: File exists (os error 17)

Impact

The file move fails instead of overwriting the target directly.

貢獻者指南