Using tee without the --append
flag, I just managed to clear out my /etc/services
file.
Can someone send me their copy from Maverick?
How to recover from silly mistakes like this on the command line?
Using tee without the --append
flag, I just managed to clear out my /etc/services
file.
Can someone send me their copy from Maverick?
How to recover from silly mistakes like this on the command line?
I'd agree with Jorge but I can't say which package
/etc/services
comes from. It certainly doesn't seem like one that would be healthy to reinstall although I could be wrong.Edit:
/etc/services
comes from thenetbase
package and gets customised by other services that install. You can find that out by runningdlocate /etc/services
(you need to installdlocate
first).So following my answer on the other thread, you could download the package manually and extract the file. Or "risk" it with
sudo apt-get --reinstall --purge install netbase
. I say risk only because the first method is just a lot safer.For the sake of not making things worse, here's a services file from an "almost virgin" upgrade to Maverick:
The answers to this question should be able to help you out on how to get the file back and how to back up your
/etc
directory.You can simply run
This might not work, e.g. if you have cleaned out your downloaded packages but it's worth a try. It worked for me