Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Unless you've specifically made adjustments to your system, there's no convenient way to recover deleted files. The upside of Linux/UNIX is, it gives you complete control over your system. The downside is, it assumes you know what you're doing and will avoid mistakes.
(Don't feel bad; we've all suffered through losing files or other lost time through typos and other mistakes.)
Your installation media might be a good place to start, although it's likely compressed into a huge tarball. Get ready to do some digging.
There are probably utilities which will let you dig into the data still on your drive. I believe that it's fairly universal that files aren't actually removed, just the pointer.
you don't remove 'networking' service to go down rlevl.0 -- at run level 0 all (not only networking) are given sigterm signals and are given time to wind up their business toward shutdown. Much more you don't need to issue a root 'rm *' thats not necessary. The best and smartest way to reach your goal is to salute: Ctl+Alt+Del.
Upon reboot your system is restored.
Go in peace. You have committed no mortal sin against your system.
malekmustaq, you're right about the runlevel 0 stuff, but unless I'm reading this wrong, jastazv has already deleted the files by mistake. This won't be restored for him when he reboots; he'll have to replace them or reinstall.
jastazv, what version/distro are you running? Someone might be able to just .tgz their own directory and put it somewhere for you, which would give you a good start.
I was trying to remove the networking service at run level 0.
I wrote:
Code:
/etc/rc0.d/$ sudo rm * networking
Accidentally I put the space between the * and the networking word.
It is possible to recover the deleted files?
It is some backup available to load from the system?
Does anybody know a generic rc0.d directory then I could use update-rc.d for linking again the services to rc0.d directory?
Any help will be really appreciated...
Usually rc?.d directories contains no actual files but links to the files in /etc/init.d or /etc/rc.d/init.d
So you can just symlink again whatever you ant stopped on runlevel 0.
Even more simple - rc6.d and rc0.d is (nearly) identical, so you can copy links from rc6 to rc0
Thank you very much to everybody that have replied this thread. I copied the lynks of rc6.d directory but it did'nt work; that only caused that either only halts or reboots.
Excuse me that I didnīt mentioned my distro. My box is running Debian GNU/Linux 5.0, Lenny.
I looked for rc0.d directory schemes in fedora and ubuntu. I made the aproppiated lynks but I didnīt work.
Finally, I saw that I was spending more time trying to solve the problem that way than reintalling the root partition, so I reinstalled.
This is a experience that taught me that I should have a backup of that important files. So, the first thing that I made was copying the /boot, /etc/init.d, /etc/rc* to my home.
Well, that's the story. Again, I really appreciate your posts. Good look GNU/Linux people.
Thank you very much to everybody that have replied this thread. I copied the links of rc6.d directory but it did'nt work; that only caused that either only halts or reboots.
Excuse me that I didnīt mentioned my distro. My box is running Debian GNU/Linux 5.0, Lenny.
I looked for rc0.d directory schemes in fedora and ubuntu. I made the aproppiated lynks but I didnīt work.
Finally, I saw that I was spending more time trying to solve the problem that way than reintalling the root partition, so I reinstalled.
This is a experience that taught me that I should have a backup of that important files. So, the first thing that I made was copying the /boot, /etc/init.d, /etc/rc* to my home.
Well, that's the story. Again, I really appreciate your posts. Good look GNU/Linux people.
Thank you very much to everybody that have replied this thread. I copied the links of rc6.d directory but it did'nt work; that only caused that either only halts or reboots.
Excuse me that I didnīt mentioned my distro. My box is running Debian GNU/Linux 5.0, Lenny.
I looked for rc0.d directory schemes in fedora and ubuntu. I made the aproppiated links but I didnīt work.
Finally, I saw that I was spending more time trying to solve the problem that way than reintalling the root partition, so I reinstalled.
This is a experience that taught me that I should have a backup of that important files. So, the first thing that I made was copying the /boot, /etc/init.d, /etc/rc* to my home.
Well, that's the story. Again, I really appreciate your posts. Good look GNU/Linux people.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.