Mark files at lower path [d]epth as originals

rmlint

  • Identify duplicate files or directories, and other filesystem issues.
    More information: <https://rmlint.readthedocs.io/en/latest/rmlint.1.html>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

rmlint --rank-by={{d}} {{path/to/directory}}

click the source code to copy install rmlint on any operating system with command-not-found.com