Hello I have built a pretty slick web interface front end that is built on ncdu for the backend scan component. I can display the tree scans and use to manage storage over time. Search for files, types etc. Its pretty amazing how fast ncdu is and we have tried everything.. from treesize pro to diskover. We have multiple petabyte isilon clusters that I am now using ncdu with to build scans and composite them into a single unified view. Once a project is complete we archive it to s3 or tape. A project can span multiple locations with people working on it. As a result there are lots of duplicate files. I was thinking I could use ncdu to create a scan and store a file hash inside the exported json file. Then I can build build some code ontop to compare scan and tell me where duplicate file paths are and then use that to consoldiate into a new single archive. Does a hash feature exist and I am overlooking it? Is this something that could be implemented? I know it would slow things down, but for long term archive scans I am not so concerned on how long the scans would take as once the scan is complete thats it. I do not need to scan again as the archive is read-only at that point but having the hash done with ncdu and stored within the json file woud be gold . Thank you !
option to create file hash and store in exported json file. #271
Closed
opened 2026年02月18日 04:35:52 +01:00 by sakerk
·
1 comment
Hello I have built a pretty slick web interface front end that is built on ncdu for the backend scan component. I can display the tree scans and use to manage storage over time. Search for files, types etc. Its pretty amazing how fast ncdu is and we have tried everything.. from treesize pro to diskover. We have multiple petabyte isilon clusters that I am now using ncdu with to build scans and composite them into a single unified view. Once a project is complete we archive it to s3 or tape. A project can span multiple locations with people working on it. As a result there are lots of duplicate files. I was thinking I could use ncdu to create a scan and store a file hash inside the exported json file. Then I can build build some code ontop to compare scan and tell me where duplicate file paths are and then use that to consoldiate into a new single archive. Does a hash feature exist and I am overlooking it? Is this something that could be implemented? I know it would slow things down, but for long term archive scans I am not so concerned on how long the scans would take as once the scan is complete thats it. I do not need to scan again as the archive is read-only at that point but having the hash done with ncdu and stored within the json file woud be gold . Thank you !
Thinking about it.. I am just going to run this as another job.
- ncdu scan runs produces the JSON
- A post-processor reads the JSON, finds duplicate candidates (same name + size)
- Reads only those candidate files from the mounted scan-targets, computes hashes using something xxhash
- Writes the hash field back into the matching entries in the same JSON file
Thinking about it.. I am just going to run this as another job.
1. ncdu scan runs produces the JSON
2. A post-processor reads the JSON, finds duplicate candidates (same name + size)
3. Reads only those candidate files from the mounted scan-targets, computes hashes using something xxhash
4. Writes the hash field back into the matching entries in the same JSON file
Sign in to join this conversation.
No Branch/Tag specified
zig
zig0.16
master
zig-threaded
openat
chdir
clear
compll
v2.9.3
v2.9.2
v2.9.1
v2.9
v2.8.2
v2.8.1
v2.8
v1.22
v1.21
v2.7
v2.6
v2.5
v1.20
v2.4
v1.19
v2.3
v1.18.1
v2.2.2
v1.18
v2.2.1
v2.2
v1.17
v2.1.2
v2.1.1
v2.1
v2.0.1
v2.0
v2.0-beta3
v2.0-beta2
v2.0-beta1
v1.16
v1.15.1
v1.15
v1.14.2
v1.14.1
v1.14
v1.13
v1.12
v1.11
v1.10
v1.9
v1.8
v1.7
v1.6
v1.5
v1.4
v1.3
v1.2
v1.1
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set.
Reference
selfisekai/ncsu#271
Loading...
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?