Hacker News new | ask | show | jobs
by shabble 4652 days ago
What happens if you try to fsck /proc or /sys?

I presume 'not much' or 'you get an error', but I don't have an instance I'm prepared to sacrifice right now, just in case something hilariously destructive happens.

2 comments

fsck doesn't run on a directory, it runs on a block device. You can't run it on /proc or /sys because those aren't backed by a block device. /proc only looks like it has a file system because the kernel "pulls" the "files" out of thin air when you try to access them.
You can run fsck in a diagnostic mode that doesn't write any changes.