LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 07-13-2006, 10:38 PM   #1
thammerlund
LQ Newbie
 
Registered: Jul 2006
Posts: 22

Rep: Reputation: 15
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
 
Old 07-13-2006, 11:13 PM   #2
bushidozen
Member
 
Registered: Oct 2004
Posts: 215

Rep: Reputation: 30
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.
 
Old 07-13-2006, 11:20 PM   #3
thammerlund
LQ Newbie
 
Registered: Jul 2006
Posts: 22

Original Poster
Rep: Reputation: 15
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
 
Old 07-13-2006, 11:27 PM   #4
bushidozen
Member
 
Registered: Oct 2004
Posts: 215

Rep: Reputation: 30
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.
 
Old 07-13-2006, 11:40 PM   #5
thammerlund
LQ Newbie
 
Registered: Jul 2006
Posts: 22

Original Poster
Rep: Reputation: 15
Again, thank you for your help.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I recover deleted files? Hector404 Linux - General 5 12-27-2005 02:35 AM
can i recover deleted files from a reiser4 fs? jameson Linux - Newbie 5 12-24-2005 05:27 AM
how to recover deleted files sibtay Linux - Software 13 01-22-2005 09:09 PM
Recover deleted files? subaruwrx Linux - Newbie 8 06-04-2004 09:47 AM
Recover deleted files markdw Linux - General 1 12-07-2001 05:08 PM


All times are GMT -5. The time now is 06:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration