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

Some temporary file remover. Lol indeed


// Thinks about that type I typed rm -rf /<space>something by mistake.

It took a few seconds before I thought... "Why does it take that long for only a handful of files?"

I never did that again.

Had my DOS filesystem mounted under Linux too (yes that long ago), and I spent a few days guessing the first letter of each deleted file with norton disk doctor or undeleter or something. That was fun (FAT16 filesystems overwrote the first letter of each filename to delete it)

At least it wasn't a mistake I made at work on some production thing. Though there is a reason I make all the desktops on windows production servers bright red. One time I was tired and shut down "my laptop" forgetting I was still logged into a remote server 200km away..... :/ Of course the iLO wasn't hooked up but I was extremely happy to find that HP servers listen to wake on LAN even when they're off. Another one for the never again books :P


"Keep non-temporary files intact" was not part of the design document.


The nice thing about temp files is that the OS will eventually remove them, even if you don't


Only if Cron is set up to do it. I have hosts without /tmp and /var/tmp clearance and they have data states which persist across reboot.

with UNIX/POSIX systems it pays to say "it depends" often.


That's fair, but a storage space specially treated as at least theoretically "ephemeral" should be cleared out on some regular basis before things start depending on it NOT being cleared out.

That said, it makes sense that at least some distros would leave a job in place to do so but initially disabled so that the user can decide based on the use-case


macOS does it on reboot, not sure if it inherited this from BSD proper


FreeBSD comes with a "periodic" script to do it daily, but it's not enabled by default.

There's this idea that macOS is "based on BSD", but that's not really the case in any meaningful way; it took some components, but the system overall isn't really "based on it" as such.


All files are temporary if your timespan is long enough.


my oldest file (sadly) is only from 2003.

how about you?


Difficult to say. The oldest file I could find says it's from 1989, but it got onto my machine a lot later. There's also a lot of "Ship of Theseus" going on, since it's a source code file that has seen lots of revisions over the decades.




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

Search: