Hello,
First, thx for this amazing tools.
Thanks to it I was able to clean my computer from a lot of bull***
I open this issue on a subject i don't rely understand by I hope it can help.
Thx to bsd/apple clone things, i am able to clone dir/ file with cp -c .
Clone are, as understand it, a kind of weird hard link but when you write over it, it save the diff.
In my example, you can see that I clone the dankest movie of my library few time and df -h
doesn't report a disk usage difference.
dust repeat the clones as there take more space on disk.
[Movies] df -h
Filesystem Size Used Avail Capacity iused ifree %iused Mounted on
/dev/disk1s1 466Gi 10Gi 90Gi 11% 484283 4881968597 0% /
devfs 403Ki 403Ki 0Bi 100% 1404 0 100% /dev
/dev/disk1s2 466Gi 352Gi 90Gi 80% 3172969 4879279911 0% /System/Volumes/Data
/dev/disk1s5 466Gi 12Gi 90Gi 12% 12 4882452868 0% /private/var/vm
map auto_home 0Bi 0Bi 0Bi 100% 0 0 100% /System/Volumes/Data/home
/dev/disk2s2 105Mi 105Mi 0Bi 100% 3 4294967276 0% /Volumes/Install Google Drive File Stream
drivefs 30Gi 7.0Gi 23Gi 24% 18446744069414596880 4294967295 146880675765702656% /Volumes/GoogleDrive
drivefs 30Gi 7.0Gi 23Gi 24% 18446744069414740697 4294967295 11796403584574832% /Volumes/GoogleDrive
[Movies] cp -cR Sonic.the.Hedgehog.2020.720p.HDRip.XviD.MP3-STUTTERSHIT clone1
[Movies] cp -cR Sonic.the.Hedgehog.2020.720p.HDRip.XviD.MP3-STUTTERSHIT clone2
[Movies] cp -cR Sonic.the.Hedgehog.2020.720p.HDRip.XviD.MP3-STUTTERSHIT clone3
[Movies] cp -cR Sonic.the.Hedgehog.2020.720p.HDRip.XviD.MP3-STUTTERSHIT clone4
[Movies] cp -cR Sonic.the.Hedgehog.2020.720p.HDRip.XviD.MP3-STUTTERSHIT clone5
[Movies] cp -cR Sonic.the.Hedgehog.2020.720p.HDRip.XviD.MP3-STUTTERSHIT clone6
[Movies] df -h
Filesystem Size Used Avail Capacity iused ifree %iused Mounted on
/dev/disk1s1 466Gi 10Gi 90Gi 11% 484283 4881968597 0% /
devfs 403Ki 403Ki 0Bi 100% 1404 0 100% /dev
/dev/disk1s2 466Gi 352Gi 90Gi 80% 3172987 4879279893 0% /System/Volumes/Data
/dev/disk1s5 466Gi 12Gi 90Gi 12% 12 4882452868 0% /private/var/vm
map auto_home 0Bi 0Bi 0Bi 100% 0 0 100% /System/Volumes/Data/home
/dev/disk2s2 105Mi 105Mi 0Bi 100% 3 4294967276 0% /Volumes/Install Google Drive File Stream
drivefs 30Gi 7.0Gi 23Gi 24% 18446744069414596880 4294967295 146880675765702656% /Volumes/GoogleDrive
drivefs 30Gi 7.0Gi 23Gi 24% 18446744069414740697 4294967295 11796403584574832% /Volumes/GoogleDrive
[Movies] dust
46G โโฌ .
24G โโโฌ Star.Wars.The.Clone.Wars.S01.1080p.BluRay.x264-FLHD[rartv]
1.1G โ โโโ Star.Wars.The.Clone.Wars.S01E22.1080p.BluRay.x264-FLHD.mkv
1.1G โ โโโ Star.Wars.The.Clone.Wars.S01E20.1080p.BluRay.x264-FLHD.mkv
1.1G โ โโโ Star.Wars.The.Clone.Wars.S01E16.1080p.BluRay.x264-FLHD.mkv
2.9G โโโฌ Sonic.the.Hedgehog.2020.720p.HDRip.XviD.MP3-STUTTERSHIT
2.9G โ โโโ Sonic.the.Hedgehog.2020.720p.HDRip.XviD.MP3-STUTTERSHIT.avi
2.9G โโโฌ clone1
2.9G โ โโโ Sonic.the.Hedgehog.2020.720p.HDRip.XviD.MP3-STUTTERSHIT.avi
2.9G โโโฌ clone2
2.9G โ โโโ Sonic.the.Hedgehog.2020.720p.HDRip.XviD.MP3-STUTTERSHIT.avi
2.9G โโโฌ clone3
2.9G โ โโโ Sonic.the.Hedgehog.2020.720p.HDRip.XviD.MP3-STUTTERSHIT.avi
2.9G โโโฌ clone4
2.9G โ โโโ Sonic.the.Hedgehog.2020.720p.HDRip.XviD.MP3-STUTTERSHIT.avi
2.9G โโโฌ clone5
2.9G โ โโโ Sonic.the.Hedgehog.2020.720p.HDRip.XviD.MP3-STUTTERSHIT.avi
2.9G โโโฌ clone6
2.9G โ โโโ Sonic.the.Hedgehog.2020.720p.HDRip.XviD.MP3-STUTTERSHIT.avi
1.4G โโโฌ Zero.Dark.Thirty.2012.1080p.BluRay.x265.10bit-z97
1.4G โโโ Zero.Dark.Thirty.2012.1080p.BluRay.x265.10bit-z97.mkv
I never ever developed in rust except 10 minute ago while try to see if metadata and filetype structure could help us here. seems not.
Actually, I have no clue to know if a file is a clone or not : (https://stackoverflow.com/questions/46417747/apple-file-system-apfs-check-if-file-is-a-clone-on-terminal-shell)
Would be glad to help you if you don't have any OSx to try thing out, but I don't think I would be able to PR anything.
Best Regards,