LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Recover Deleted Files (https://www.linuxquestions.org/questions/linux-newbie-8/recover-deleted-files-463850/)

thammerlund 07-13-2006 09:38 PM

Recover Deleted Files
 
Hi,

I made a real newbie mistake. Instead of using cd ./etc I used cd /etc and went to root/etc where I proceeded to rm all the files. I know, I did it as root, and not my system is screwed up, but is there any way to recover those files?

Also, this all happened because I wanted to delete a directory and I tried using rmdir, but it doesn't let you remove it if it's not empty, so is there a faster way to do it?

Thank you for your help,
Tom

bushidozen 07-13-2006 10:13 PM

Take a look at this site:
http://www.cyberciti.biz/nixcraft/vi...eted-files.php
It might help you recover your files.

If you want to remove a directory (along with the files in it) you can type:
Code:

rm -r
Adding the -r will cause rm to remove every file in the directory until it's empty, then it will remove the directory.

thammerlund 07-13-2006 10:20 PM

Thank you for replying.

How about this solution; I have another server with an almost identical configuration, and I was thinking of just copying the files from that server's etc file to mine through Samba. I tried to do that, but even though I did $ chmod 777 *, some files cannot be moved/copied. At least not that way. Do you think that would work?

Thank you again,
Tom

bushidozen 07-13-2006 10:27 PM

I wouldn't recommend it. You might be able to "get by" (maybe) by doing that, but 90% of all linux config files are stored in /etc. Just copying the folder from another computer could have unknown consequenses.

thammerlund 07-13-2006 10:40 PM

Again, thank you for your help.


All times are GMT -5. The time now is 08:16 AM.