LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Restoring files from the trash (cmd line) (https://www.linuxquestions.org/questions/linux-general-1/restoring-files-from-the-trash-cmd-line-359527/)

mtoneil 09-02-2005 11:09 AM

Restoring files from the trash (cmd line)
 
I accidentally deleted etc/init.d without realizing it. So the next time I booted up my server (Fedore Core 3), the GUI won't load and it goes to the command line. Obviosuly there are other problems as well (apache can't boot up now, etc).

I found init.d in the root's trash (/root/.Trash/) but I don't know how to restore it from the command line. I tried moving it and copying it (back to /etc/) but neither will work. Is there a command to undelete a file from trash?

If anyone can help ASAP I would greatly appreciate it. Thanks!

P.S. I am logged in as root obviously.

cs-cam 09-02-2005 09:32 PM

For the record, linux doesn't have a Trash/Recycle Bin in the sense that Windows does. That folder is (for GNOME at least), a psuedo-trash folder, it's a perfectly normal directory and requires no special commands to play with :)

Now to the problem, copying it back should fix the problem. Is the dir structure /root/.Trash/etc/init.d? If so, this *should* work...
Code:

cp /root/.Trash/etc/* /etc/


All times are GMT -5. The time now is 11:21 PM.