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

Is possible to add feature to remove all hardlinks? #267

Open
WMP opened this issue Jul 29, 2023 · 1 comment
Open

Is possible to add feature to remove all hardlinks? #267

WMP opened this issue Jul 29, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@WMP
Copy link

WMP commented Jul 29, 2023

I have many files for which many hardlinks are created. gdu I use to clear disk space. When I press d to delete a file, there is no more space on the filesystem because it is a hardlink, and I have to delete all hardlinks to make more space on the disk. Is it possible to add a switch in gdu, which activates the option of deleting all hardlinks, instead of just one hardlink?

@namespacebrian
Copy link

It's not an exact match for what you're asking for, but the tool rmlint might be able to address some of your needs here. By default it will identify two hard links to the same file as duplicates.. so it could find those for you... I might use rmlint -gfor progress meter, and possibly add -F if you want it to ignore symbolic links. It doesn't take action when you run it.. it generates a .json file and a .sh script with the results. The script will, by default, delete the duplicates, but you can use more command line options to have it do other things. I just read the script... scroll the first ~7 pages or so of the script is all helper functions.. then the list of original/duplicates is after all that.

@dundee dundee added the enhancement New feature or request label Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants