Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • 2
    This comment will be useless but Linux coreutils mv doesn't have this issue: mv bar/ baz -> mv: cannot move 'bar/' to 'baz': Not a directory Commented Jun 24, 2020 at 15:51
  • @ArtemS.Tashkinov Good to know! Weirdly enough though, gmv (installed via brew install coreutils) has the same issue on my side. Commented Jun 24, 2020 at 16:03
  • one way in Bash might be set mark-directories off in a INPUTRC file, but that setting applies to all directories, not just symlinks Commented Jun 24, 2020 at 16:06
  • Maybe bash 3.2 is a bit too dated? I see it is from 2006. Not much helpful, but for the slash in autocomplete, you may disable it if your bash has mark-symlinked-directories option (look in man bash, "Readline Variables" section). Commented Jun 24, 2020 at 16:06
  • 1
    The difference between OSes is down to the behavior of the rename system call, and this looks like a bug in Linux's rename. Why would rename("bar/", "baz") fail with ENOTDIR? It's supposed to be equivalent to rename("foo", "baz"). Commented Jun 24, 2020 at 17:15