This C program operates on raw images of disk partitions, created using the dd tool after unmounting the partition:
dd if=/dev/[NAME_OF_PARTITION] of=disk.img bs=4kThis command creates a raw disk image called disk.img. Using bs=4k ensures faster reading and writing by processing data in 4k chunks. Instructions for adding virtual disk images, creating partitions, and mounting partitions can be found in the FreeBSD Handbook - Disks.
The program uses UFS2 (Unix File System) structures, including the superblock, inode structures, and direct structures, to read a raw disk image and hierarchically list all the files and folders within it.
./fs-find [PATH TO RAW IMAGE OF DISK PARTITION]