Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Beware race conditions when writing to /var/trashlist (assuming you mean "a file with one path per line.")

Proposed tweaks: symbolic link into /var/trashlist directory, where the name of the symbolic link is "<timestamp>-<random stub>-<original basename>". Timestamp first so we can stop once we hit the first too-recent timestamp, random stub to unique the original base name if two different files In different directories are deleted at the same timestamp, original file name for inspection.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: