News for hackers. Stuff that matters.
Re:I've screwed up plenty of things too by JKirchartz on Tuesday February 11, 2020 @10:15AM (#22299073)
I did this on a VM once - it's fun for about 15 minutes... then burn it all and start from scratch.
Re:I've screwed up plenty of things too by ianai on Tuesday February 11, 2020 @11:29AM (#22299710)
Is there a way to save and revert such metadata? I can’t think of anything that stores just FS metadata.
Re:I've screwed up plenty of things too by Lammy on Tuesday February 11, 2020 @03:07PM (#22302242)
FreeBSD does! You can rescue yourself from this with mtree. Something like:

> cd /

> mtree -U -f /etc/mtree/BSD.root.dist

> mtree -U -f /etc/mtree/BSD.var.dist

> mtree -U -f /etc/mtree/BSD.include.dist

> mtree -U -f /etc/mtree/BSD.sendmail.dist

> mtree -U -f /etc/mtree/BSD.usr.dist

Re:I've screwed up plenty of things too by BenjiWiebe on Tuesday February 11, 2020 @02:43PM (#22301943)
I think rsync has an option to copy everything but file contents. Couple that with 'find' running 'touch' and it should be fine. (create blank files, copy attributes to them)