sahib / rmlint

Extremely fast tool to remove duplicates and other lint from your filesystem
http://rmlint.rtfd.org
GNU General Public License v3.0
1.91k stars 132 forks source link

Order of directories ignored despite "p" parameter? #569

Closed james-cook closed 2 years ago

james-cook commented 2 years ago

Again, probably obvious error on my part Env: - WSL(1), Windows 10, NTFS - recent compile of rmlint

I am comparing a very large set of files. The directories concerned are passed one after the other.

sudo rmlint --progress \
       -c sh:hardlink \
       --xattr \
       -T "df -emptyfiles -emptydirs -dd" \
       -S mpda \
       -s 500KB-1TB \
       '/mnt/k/A/20160505-MRd' \
       '/mnt/k/A/20160622-MR' \
       '/mnt/k/A/NOT.ON.WEB-[235GB]'

(many other directories are not shown)

The last directory NOT.ON.WEB etc. is newly added in the current run of the rmlint command.

The "strange" thing is that this cp_hardlink is generated (as an example): cp_hardlink '/mnt/k/A/NOT.ON.WEB-[235GB]/OC.and.NC.from.all.over-HARDLINKS/owncloud - Copy/Docs - NEW/s/Scans BU Dec 2014/Africa_Turmoil_WEB.pdf' '/mnt/k/A/20160505-MRd/Users/xxx/ownCloud/Docs - NEW/s/Scans BU Dec 2014/Africa_Turmoil_WEB.pdf' # duplicate

This is despite the files having the exact same modification timestamp - which means precedence should be for first directory in the list (p option):

stat '/mnt/k/A/NOT.ON.WEB-[235GB]/OC.and.NC.from.all.over-HARDLINKS/owncloud - Copy/Pictures/from mac/Movie on 12-29-12 at 10.10 PM.mov'
  File: /mnt/k/A/NOT.ON.WEB-[235GB]/OC.and.NC.from.all.over-HARDLINKS/owncloud - Copy/Pictures/from mac/Movie on 12-29-12 at 10.10 PM.mov
  Size: 4459591063      Blocks: 8710144    IO Block: 4096   regular file
Device: fh/15d  Inode: 562949954188013  Links: 1
Access: (0777/-rwxrwxrwx)  Uid: ( 1000/ xxx)   Gid: ( 1000/ xxx)
Access: 2022-04-17 17:30:31.774175700 +0100
Modify: 2012-12-30 20:04:34.000000000 +0000
Change: 2022-04-17 17:30:31.785200100 +0100
 Birth: -
stat '/mnt/k/A/20160505-MRd/Users/xxx/ownCloud/Pictures/from mac/Movie on 12-29-12 at 10.10 PM.mov' # duplicate
  File: /mnt/k/A/20160505-MRd/Users/xxx/ownCloud/Pictures/from mac/Movie on 12-29-12 at 10.10 PM.mov
  Size: 4459591063      Blocks: 8710144    IO Block: 4096   regular file
Device: fh/15d  Inode: 281474979556189  Links: 3
Access: (0777/-rwxrwxrwx)  Uid: ( 1000/ xxx)   Gid: ( 1000/ xxx)
Access: 2022-04-17 17:30:31.777174800 +0100
Modify: 2012-12-30 20:04:34.000000000 +0000
Change: 2022-03-19 00:19:05.538334500 +0000
 Birth: -
james-cook commented 2 years ago

Closing - seems to be ok, as cp_hardlink operates the other way around :)