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: keybinding to recompute the size of a directory #37

Open
ArenM opened this issue Feb 5, 2025 · 1 comment
Open

Feature: keybinding to recompute the size of a directory #37

ArenM opened this issue Feb 5, 2025 · 1 comment

Comments

@ArenM
Copy link

ArenM commented Feb 5, 2025

Motivation

When attempting to free disk space, I sometimes do things other than deleting files such as running git gc or compressing them. This makes the size listed in btdu inconsistent with the size on disk until btdu is restarted. Closing, reopening, and navigating back to the directory is an inefficient process.

Having a keybinding to recompute sizes for the current directory based on only new data would make this much easier. Ncdu uses the "r" key for this.

Implementation ideas / Speculation

I suspect refreshing a directory will require also refreshing anything that shares data with the directory.

Perhaps it would be easier to always refresh the root directory? This would be essentially the same as closing and restarting btdu, but would preserve the current directory.

Would it be possible to detect size changes by comparing a subset of most / least recent samples in a file / directory?

@CyberShadow
Copy link
Owner

I think the only way we could do that is if we threw away all samples, i.e. something like a "reset" key.

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