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

Temporarily mounted an NFS volume to a folder under /tmp.

Forgot about tmpwatch, a default entry in the RHEL cron table to clear out old temp files.

4AM the next morning, recursive deletion on anything wiuth a change time older than n days.



/mnt and /media exist for reasons. And root_squash and ...

Why no, I've NEVER accidentally deleted whole file systems, I have completely earned superiority here.

Delete /proc and /dev on a running server. Thankfully not really disastrous but damn if people don't notice right away.

Thanks for the tmpwatch info btw.


Long ago I was trying to solve some thorny problem that I now forget and I thought it might be a good idea to uninstall and reinstall glibc. I knew it was a bad idea but I was at the point where I was past caring and figured why not see what happens. Turns out, in order to uninstall glibc there's a confirmation prompt, and instead of just 'y' or 'n' you have to type a whole sentence that's something like "yes, I understand this is a really bad idea". Well, I did that, and it was a really bad idea, the system was, unsurprisingly, basically unusable after that.


Would have used /media but was thinking, if, say I forgot to unmount it or someone looked at a disk free or whatever, that it would be obvious that it was there temporarily.

Obviously that was incorrect, but the reasoning was, I think, sound.


I like /mnt/scratch/ for that. If I was using systems with lots of others, I'd make it clearer with /mnt/tmp/.


You can't delete /proc, it is a pseudo filesystem the kernel creates. They aren't really files. Deleting /dev is a real pita however


With udev deleting /dev shouldn't be a problem I thought?


udev has been deprecated. devtmpfs, a pseudo filesystem just like tmpfs has sort of replaced it. Gotta love Linux, they change things just for fun :)


I did something similar. I moved some files around between a university computer and an SFTP mount (mounted through the ubuntu UI). When I leave those computers, I always execute "rm -rf ~" because they are restored to some image every time they boot anyway and I'd rather not leave anything personal behind. It was only when I started seeing "access denied" in my terminal that I realised that ubuntu had mounted the entire server on the other end in some hidden directory in my home folder, and that I was deleting every file on it for which I had write permissions. Luckily a quick CTRL+C saved my own files but I'm not sure the same could be said about a few students who were unlucky and had "loose" permissions in their home directories.


So tmpwatch traverses filesystems. Is that a bug? (thinks: "-xdev").

Edit: Reading tmpwatch.c: "Try hard not to go onto a different device". Perhaps old bug?


Actually yes, I think it was patched to not traverse file systems afterward. It was around 2005 when this happened.


[deleted]


He says a folder _under_ /tmp/


Whoa.




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

Search: