Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
|
stranger-ss's comments
login
stranger-ss
3 months ago
|
parent
|
context
|
next
[–]
| on:
Show HN: Thanos-CLI – a Python tool that deletes h...
Thanos deletes files of the directory you’re currently standing in
stranger-ss
3 months ago
|
parent
|
context
|
prev
[–]
| on:
Show HN: Thanos-CLI – a Python tool that deletes h...
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
d3Xt3r
3 months ago
|
parent
[–]
I reckon you should change it to delete half a file in such a case, it'll be pretty funny (basically call truncate(), and also rename the file to half the original name, heh).
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: