2 points | by stranger-ss 10 hours ago ago
4 comments
> exactly half the files in a directory
What if there are an odd number of files, does it delete half a file then?
If the number of files is odd, Thanos keeps things simple - no fractional file slicing yet
Example:
11 files -> deletes 5, keeps 6 (because 11 // 2 = 5)
1 file -> deletes 0, keeps 1
Which of . And .. does it delete?
Thanos deletes files of the directory you’re currently standing in
> exactly half the files in a directory
What if there are an odd number of files, does it delete half a file then?
If the number of files is odd, Thanos keeps things simple - no fractional file slicing yet
Example:
11 files -> deletes 5, keeps 6 (because 11 // 2 = 5)
1 file -> deletes 0, keeps 1
Which of . And .. does it delete?
Thanos deletes files of the directory you’re currently standing in