• 0 Posts
  • 3 Comments
Joined 1 year ago
cake
Cake day: June 29th, 2024

help-circle

  • My theory for why it created copies: The files you listed look like they are all subdirectories from /dev, which is (usually) a separate filesystem. When you try to move a file or directory across filesystems, the OS can’t just change the link, it has to actually copy the files and then remove the original. As a directory is a set of links to files, and the copies are different files, directories are just newly created with the same name in the new location instead of copying the directory filesystem entry. It looks like mv creates these target directories, before it checks if it actually has permission to remove the source, but checks file permissions, before it copies them