1

There are many applications for visualizing the files/directories that take up the most space, for example all of these: How to understand what's taking up disk space?, and other similar ones for Windows, but all of them take quite a long time for analyzing, except WizTree for Windows, that analyzes the whole disk in a few seconds. They state this in their website: "When scanning NTFS formatted drives, WizTree reads the hard drive's Master File Table (MFT) directly from the disk (like Everything Search does)"

I remember there was a Linux utility called readfrag (source code) that was able to do a low level read of the filesystem metadata (it needed root privileges, just like WizTree needs Administrator) for copying fragmented files. It read them much faster than cp (I can't find it online anymore). Considering this, is there a tool that uses this feature to do something like WizTree?

golimar
  • 417
  • I'm a bit intrigued by how the tool for fragmented file reading could be faster than the kernel - it has to use the same data, and has to cross the kernel / userland binary multiple times, whereas a simple read or copy_file_range syscall could do it all under the hood, without a context switch for every fragment of your fragmented file. I mighty be missing something, though! – Marcus Müller Jan 12 '23 at 10:38
  • @MarcusMüller it might just list the files before copying, and listing by directly reading metadata is much faster – phuclv Jan 12 '23 at 11:31
  • @phuclv ah, the benefit lies in avoiding multiple readdir(2) / getdents64(2), then, and less in the file fragmentation? – Marcus Müller Jan 12 '23 at 12:00
  • 1
    @MarcusMüller yeah it could be like that. I've never seen that tool but it may show you a list of files and their fragmentation status for you to choose which one to degrag – phuclv Jan 12 '23 at 12:02
  • 1
    Here's the source code: readfrag.c ... it's now part of a package called gatling, some distros might have it in their repos. – don_crissti Jan 12 '23 at 12:11

0 Answers0