A bit of context that I think is relevant for the appropriate solution:
I have a server that has two folders; one is ingest, the other is sorted. The source of the sorted folder is the ingest folder, all directories are unique, all files are hard links.
The result of this is that when the ingest folder has a file deleted, it stays in the sorted folder, and vice versa. This makes cleanup almost impossible, as there are hundreds of thousands of files totaling about 40 terabytes.
I have a script to add all links to a database, with their inode and path name. I can then use some SQL to find the inodes that only appear once, and decide whether or not I want to delete them.
This solution is very slow (need to refresh the entire database every time I want to manage it) and quite clunky (need to run the query, then manually delete files over CLI).
Is there a solution like ncdu or any dual-pane file browser that can show inodes, and filter specifically on number of links for the inode (as shown by
stat
)?
Asked by 66h3m3ab
(111 rep)
Aug 7, 2021, 04:56 PM
Last activity: Aug 7, 2021, 06:11 PM
Last activity: Aug 7, 2021, 06:11 PM