Can anyone tell me how I can undo a sudo rm -r /var/run
mistake?
I am unable to use sftp and mysql now.
Can anyone tell me how I can undo a sudo rm -r /var/run
mistake?
I am unable to use sftp and mysql now.
mkdir /var/run
chmod 755 /var/run
that will fix most things, anything that still doesn't work will just need to be restarted
edit: restarted as in, /etc/init.d/ssh restart
which will recreate /var/run/sshd. you may have some issues with the pid files being missing, nothing a manual pkill won't fix.
It depends. On certain file-system types, it is possible to do an undelete and recover earlier data such as for reiserfs but it may not work for other file-systems. However, your mileage may vary.
If it is a matter of getting some applications to work, you may succeed by re-installing some of them and re-starting others.