LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-26-2004, 01:15 AM   #1
yenonn
Member
 
Registered: Feb 2003
Location: Malaysia
Distribution: Redhat 8.0, 9, Slackware 9.1
Posts: 511

Rep: Reputation: 30
oops!!! i deleted /etc/


i accidentally deleted /etc/.. so, how am i going to restore it???
HELP!!!!!!!
 
Old 04-26-2004, 03:28 AM   #2
orange400
Member
 
Registered: Mar 2003
Location: Bellevue, WA
Distribution: Arch w/ XFCE
Posts: 834

Rep: Reputation: 30
lol ... nice one yenonn ...

Just curious, does linux still work??
 
Old 04-26-2004, 03:50 AM   #3
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Sounds like a reinstall is going to be on your schedule soon.

The only hope you have (that I can think of) is to try and reinstall the /etc directory from the package on your installation CD. I know Slackware has /etc as a separate package that you could reinstall if need be.

You didn't say if this happened on Slackware or RH, so I don't know if that is going to help you.
 
Old 04-26-2004, 06:12 AM   #4
orange400
Member
 
Registered: Mar 2003
Location: Bellevue, WA
Distribution: Arch w/ XFCE
Posts: 834

Rep: Reputation: 30
If you delete something in linux, does it just disregard the data or actually destroy it? Cause with windows you can use Norton to recover deleted files. And I don't mean recycle bin, the real deleting kind of deleting.
 
Old 04-26-2004, 05:35 PM   #5
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
normally the file system will just erase the data that says where the file is, some file systems might try and destroy it, but that takes a long time to erase the file, so normally its just disregarded as you put it.

you can try and recover the data, there is recovery tools, i think there are a recovery tool for every filesystem , cause i don't see how a recovery tool can work for 100% of the filesystems

go look at sourceforge.net theres a few utils i remember seeing for system recovery
 
Old 04-26-2004, 07:23 PM   #6
driftingremains
LQ Newbie
 
Registered: Jul 2003
Location: Mass
Distribution: gentoo
Posts: 20

Rep: Reputation: 0
I would say, how did you "Accidently" do it, I mean seriously, rm -rf /etc/, who does it? or right clicking and deleting in a GUI interface, I mean seriously, why would you delete it.
 
Old 04-26-2004, 07:25 PM   #7
yenonn
Member
 
Registered: Feb 2003
Location: Malaysia
Distribution: Redhat 8.0, 9, Slackware 9.1
Posts: 511

Original Poster
Rep: Reputation: 30
my machine is RH... after the deletion of /etc/ the whole machine seems to be hanging around... i cant even fire a command in the console...
so... is there anyway to restore the deleted files? just like windows, any files that were deleted, would remain still in recycle bin... are there term like this in linux???
i know we have a "Trash". but, inside the "Trash" i dun see any of my deleted files...
can u able to recommend some recovery tools for me??? thanks...
 
Old 04-26-2004, 07:27 PM   #8
driftingremains
LQ Newbie
 
Registered: Jul 2003
Location: Mass
Distribution: gentoo
Posts: 20

Rep: Reputation: 0
I don't think so, I'd say pop in a live cd if you have one and backup what you need and reinstall your distro.
 
Old 04-26-2004, 07:32 PM   #9
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 48
don't you have a backup?
 
Old 04-26-2004, 07:39 PM   #10
AutOPSY
Member
 
Registered: Mar 2004
Location: US
Distribution: Redhat 9 - Linux 2.6.3
Posts: 836

Rep: Reputation: 31
Tell us how you deleted /etc .
 
Old 04-26-2004, 09:10 PM   #11
yenonn
Member
 
Registered: Feb 2003
Location: Malaysia
Distribution: Redhat 8.0, 9, Slackware 9.1
Posts: 511

Original Poster
Rep: Reputation: 30
rm -fr /etc/

actually, i was login as a root and the through the command prompt, i pressed up and down button to retrieve whatever commands that i had been gone through...
by editing one of the history command i accidentally pressed "enter"...
then, OMG!!!!!! i been deleted my files.. i kept pressing ctrl+z to terminate the command, but, it executed in just in a second...

as usual, i fond to login as root... because i found that, login as a normal user is pretty troublesome. i hate it... many of the command prompts are constrained.
furthermore, much of the time, i am doing server configurations...so, i just login as root... and do all commanding. or what is the preferable way, as u guys been doing?? login as root??? or normal users?? any alternatives way, or flexible way???

gosh... arent there any turning points???
if so, i have to reinstall everything...


Last edited by yenonn; 04-26-2004 at 09:20 PM.
 
Old 04-26-2004, 10:32 PM   #12
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
download a access control list program, so it will limit the root users power, you should be able to set it up so config privileges get to one use, some other privilege to another and so on... you should be also able to set it up so you can the net config tools when you want from your normal account

and theres no trash can I'm linux rm removes files immediately, the only trash cans are ones you install, and only they just keep a list of files usually then delete them when you tell it to, something rm wont do
 
Old 04-27-2004, 12:33 AM   #13
RolledOat
Member
 
Registered: Feb 2003
Location: San Antonio
Distribution: Suse 9.0 Professional
Posts: 843

Rep: Reputation: 30
Quote:
Originally posted by yenonn
as usual, i fond to login as root... because i found that, login as a normal user is pretty troublesome. i hate it... many of the command prompts are constrained.
Sounds like you just discovered the weakness in another OS where, usually, admin is the de-facto user. Things like virus' (viri?), worms, and generally the ability to destroy your system accidentally since the admin user can do anything.

For the tedius things, I create expect scripts that su to root automatically that then perform functions. Like ifup/ifdown when I need to dial into work, root xmms (gotta have nice -19), yast icon on desktop that doesn't prompt me for a password, that kind of thing.

I feel for you, but a re-install is happening soon. If you have a live CD, you can probably recover and backup some of your data.

RO
 
Old 04-27-2004, 02:20 AM   #14
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
If you were using ext3, there may be no recovery (unfortunately) -- J.W.

http://batleth.sapienti-sat.org/proj.../ext3-faq.html
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kmail crashes when deleted mail is deleted dufferin Slackware 0 03-21-2005 03:23 PM
deleted linux partition adn the boot loader was deleted also,now i have only gnu grub boris199 Linux - Laptop and Netbook 2 01-29-2005 04:53 PM
oops-deleted binutils-build Barnette Linux From Scratch 2 01-14-2005 05:23 PM
oops! nerdboy Linux - Networking 1 09-13-2002 03:29 AM
oops, i deleted /dev/scd0!!! vance Linux - General 2 06-13-2002 02:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:40 AM.

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
Open Source Consulting | Domain Registration