Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: add -p, --path option to rmsh command #35

Open
joostdekeijzer opened this issue Dec 13, 2020 · 1 comment
Open

Feature Request: add -p, --path option to rmsh command #35

joostdekeijzer opened this issue Dec 13, 2020 · 1 comment

Comments

@joostdekeijzer
Copy link

I have the following use-case. Maybe I'm overlooking something but currently I don't see any way to do this without some extensive programming around dupd.

Say I have the following directory layout:
Screenshot 2020-12-13 at 15 48 06

What I'm looking for is to remove all duplicate files from /path2/ keeping all files from /path1/ and one copy of every file unique to /path2/.

  • When I run dupd rmsh I'm not sure which copy is kept of every file, it can be either from /path1/ or /path2/.
  • When I run dupd dups -p /path2/ then the files foo and test are reported twice which makes it impossible to remove the dups report "blindly" because then I completely remove file foo from my system.

In above layout, it would work something like:

$ dupd scan ./files10/
   done
$ dupd rmsh --path ./files10/path2/
  # copy paste lines below in your terminal to remove the duplicates
  rm ./files10/path2/hello
  rm ./files10/path2/sub/foo
  rm ./files10/path2/sub/test
  rm ./files10/path2/test

Also attached files10 in zip.
files10.zip

@jvirkki
Copy link
Owner

jvirkki commented Dec 13, 2020

Agreed the rmsh script isn't very flexible. I added it long ago but never used it myself so it hasn't received much attention.

Now that the 2.0 version is in development (so I have a chance to make incompatible changes from 1.x) it might be a good time to restructure how it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants