markfasheh / duperemove

Tools for deduping file systems
GNU General Public License v2.0
689 stars 75 forks source link

`--exclude=` doesn't work #343

Closed mooreye closed 1 day ago

mooreye commented 2 months ago

I want to exclude a location:

sudo duperemove -drh --hashfile=/opt/dedupe.hash --exclude=/home/user/Foo/ /home/user/

The output says:

Adding exclude pattern: /home/user/Foo/

but then it still dedups it:

[0x55a36b429d30] Dedupe 1 extents (id: 7e1c978a) with target: (6.8GB, 128.0KB), "/home/user/Foo/file"

I also tried --exclude=/home/user/Foo/\* and --exclude=/home/user/Foo/file but none work.

Version: 0.14.1 Using Fedora 40

JackSlateur commented 2 months ago

Hello @mooreye The --exclude option takes a regex : in your case, you should use something like that:

sudo duperemove -drh --hashfile=/opt/dedupe.hash --exclude="/home/user/Foo/*" /home/user/