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

Rank origin based on alphabetical sort on the path #471

Closed slmeyer closed 3 years ago

slmeyer commented 3 years ago

I have lots of directories which are named with dates in ISO format, so the lowest alphabetically is also the oldest. The archive have been copied around in different ways, so mtime doesn't work anymore. It looks like the alphabetical sort only looks at the filename. A ranking based on alphabetical sort of path would solve my problem (file basenames are identical)

SeeSpotRun commented 3 years ago

Ok, can add --sort-by=f option to sort by full path name.

Edit: should have been --rank-by=f

slmeyer commented 3 years ago

Perfect, thanks

SeeSpotRun commented 3 years ago

@slmeyer are you able to compile from https://github.com/SeeSpotRun/rmlint/tree/sort-on-path and check this does what you want?

slmeyer commented 3 years ago

Unfortunately no success compiling.

Using the arch PKGBUILD file in your branch gives me the 'normal' version.

Trying to adapt the PKGBUILD file gives some errors due to missing version info

Using the scons command from the Arch package in the downloaded git repository gives some errrors:

Linking Program ==> rmlint /usr/bin/ld: librmlint.a(utilities.o): in function rm_mounts_create_tables': /home/data/scripts/rmlint/rmlint/lib/utilities.c:733: undefined reference tomakedev' /usr/bin/ld: /home/data/scripts/rmlint/rmlint/lib/utilities.c:769: undefined reference to minor' /usr/bin/ld: /home/data/scripts/rmlint/rmlint/lib/utilities.c:769: undefined reference tomajor'

I don't find any instructions how to do it?

On 15/03/2021 21.51, Daniel T wrote:

@slmeyer https://github.com/slmeyer are you able to compile from https://github.com/SeeSpotRun/rmlint/tree/sort-on-path https://github.com/SeeSpotRun/rmlint/tree/sort-on-path and check this does what you want?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sahib/rmlint/issues/471#issuecomment-799743443, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZAYW42DRND5SMDDCL2S7DTDZXN7ANCNFSM4XYXNTTQ.

SeeSpotRun commented 3 years ago

I think you're missing the optional dependency libblkid which I think on arch is in https://archlinux.org/packages/core/x86_64/util-linux/.

See https://rmlint.readthedocs.io/en/latest/install.html

slmeyer commented 3 years ago

No, it is installed, also tried reinstalling, strange it finds undefined rerences in linking the program.

On 16/03/2021 23.54, Daniel T wrote:

I think you're missing the optional dependency libblkid which I think on arch is in https://archlinux.org/packages/core/x86_64/util-linux/ https://archlinux.org/packages/core/x86_64/util-linux/.

See https://rmlint.readthedocs.io/en/latest/install.html https://rmlint.readthedocs.io/en/latest/install.html

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sahib/rmlint/issues/471#issuecomment-800665604, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZAYW4GVCHD7YBLHQ5LKPLTD7ORLANCNFSM4XYXNTTQ.

SeeSpotRun commented 3 years ago

I'm clutching at straws but maybe try:

$ scons --clean
$ scons --no-cache

Also check if /usr/include/sys/sysmacros.h exists.

SeeSpotRun commented 3 years ago

Oh wait, I see now. You were compiling the old master branch in my repo which is wayyyyy out of date. Try this:

$ cd <dir where you cloned my repo to>
$ git checkout sort-on-path
$ scons DEBUG=1 SYMBOLS=1
$ ./rmlint --rank-by=f [other options...] <paths to search...>
SeeSpotRun commented 3 years ago

Changes merged into develop branch; closing issue. Please re-open if it needs further tweaking.