FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 04-17-2008, 08:36 PM
"Joost Witteveen"
 
Default removed root directory files

On 17/04/2008, Abraham Chaffin <abrahamchaffin@gmail.com> wrote:
> Hey All,
>
> Bit of a problem here - I ran rm /*
> It didn't remove the directories obviously but now no commands work but cd

cd is a bash-builtin, that's why it works. "echo", "type", "cat", etc
also work, I suppose.

> I was wanting to run ./*
> Now if I ls I get
> -su: /bin/ls: No such file or directory

I suppose the /bin/ls file still is OK (test by "cd /bin; echo *", you
should see ls as one of the many commands listed), but either
/lib/ld-linux.so or some other library has gone. That is strange, as
just typing "rm /*" should not remove anything but files in / , so I
suspect you actually typed something else than "rm /*"

> Help much appreciated.

Insert debian boot CD, boot, mount your root partition of harddisk,
and inspect it.
Maybe you only removed a few files from /lib, you might be able to
copy them from the boot disk /lib. But I suppose a re-install of
Debian would be safer (or wait till someone else has a better idea on
this list).


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 04-17-2008, 09:08 PM
"Abraham Chaffin"
 
Default removed root directory files

> Hey All,

>

> Bit of a problem here - I ran rm /*

> It didn't remove the directories obviously but now no commands work but cd



cd is a bash-builtin, that's why it works. "echo", "type", "cat", etc

also work, I suppose.

*

> I was wanting to run ./*

> Now if I ls I get

> -su: /bin/ls: No such file or directory



I suppose the /bin/ls file still is OK (test by "cd /bin; echo *", you

should see ls as one of the many commands listed), but either

/lib/ld-linux.so or some other library has gone. That is strange, as

just typing "rm /*" should not remove anything but files in / , so I

suspect you actually typed something else than "rm /*"




Yea echo * works - and it looks like the files in the subfolders are in place. Maybe i deleted some aliases that were in the root directory?
I'm not seeing
/lib/ld-linux.so - but I am seeing ld-2.3.6.so and ld-linux.so.2
Only command run that would have messed things up was the "rm /*" command.
It's a pretty fresh install of Debian so all the files should be in their usual locations.



*
> *Help much appreciated.



Insert debian boot CD, boot, mount your root partition of harddisk,

and inspect it.

Maybe you only removed a few files from /lib, you might be able to

copy them from the boot disk /lib. But I suppose a re-install of

Debian would be safer (or wait till someone else has a better idea on

this list).



If there's a way to do it without having to put a cd in would be really great =o
The server is pretty far away - but if not then so be it.

Thank you for the help,

Abraham
 
Old 04-17-2008, 09:22 PM
Mark Allums
 
Default removed root directory files

> On 17/04/2008, Abraham Chaffin <abrahamchaffin@gmail.com> wrote:
>> Hey All,
>> I was wanting to run ./*
>> Now if I ls I get
>> -su: /bin/ls: No such file or directory

Wondering a bit why not just run

rm *

instead of the (error prone)

rm ./*

What am I missing?

--Mark Allums


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 04-18-2008, 05:39 AM
Martin S
 
Default removed root directory files

Joost Witteveen skrev:

On 17/04/2008, Abraham Chaffin <abrahamchaffin@gmail.com> wrote:


Hey All,

Bit of a problem here - I ran rm /*
It didn't remove the directories obviously but now no commands work but cd



cd is a bash-builtin, that's why it works. "echo", "type", "cat", etc
also work, I suppose.



I was wanting to run ./*
Now if I ls I get
-su: /bin/ls: No such file or directory



I suppose the /bin/ls file still is OK (test by "cd /bin; echo *", you
should see ls as one of the many commands listed), but either
/lib/ld-linux.so or some other library has gone. That is strange, as
just typing "rm /*" should not remove anything but files in / , so I
suspect you actually typed something else than "rm /*"



Help much appreciated.



Insert debian boot CD, boot, mount your root partition of harddisk,
and inspect it.
Maybe you only removed a few files from /lib, you might be able to
copy them from the boot disk /lib. But I suppose a re-install of
Debian would be safer (or wait till someone else has a better idea on
this list).

Did the OP run this as root? Looking at my new installation of Debian
Etch I can't see anything in / (ls -la /) that would affect the
behaviour. Or I'm missing the bleedin' obvious.


Martin S


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 04-18-2008, 01:03 PM
Sharninder
 
Default removed root directory files

On 18-Apr-08, at 1:52 AM, "Abraham Chaffin" <abrahamchaffin@gmail.com>
wrote:



Hey All,

Bit of a problem here - I ran rm /*
It didn't remove the directories obviously but now no commands work
but cd

I was wanting to run ./*
Now if I ls I get
-su: /bin/ls: No such file or directory
Help much appreciated.

Thanks,

Abraham



A simple rm should not have removed user commands which are in other
directories. There must be something else wrong. In any case if you
really have lost the binaries there is not much that you can do at
this point.


--
Sharninder



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 04-18-2008, 01:18 PM
George Borisov
 
Default removed root directory files

Sharninder wrote:
A simple rm should not have removed user commands which are in other
directories. There must be something else wrong. In any case if you
really have lost the binaries there is not much that you can do at this
point.


One possible scenario is that something "clever" was done, like aliasing
"rm" to "rm -r".


But yes, if you managed to recursively delete your root directory tree
then a restore from backup / rebuild is on the cards.



George.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 04-22-2008, 09:02 PM
"Abraham Chaffin"
 
Default removed root directory files

I didn't do "rm -r" just "rm /*"* I was root when I executed this command.
Ended up reinstalling the os, luckily there wasn't much on the machine and was really just a backup so nothing was lost.

Not sure what it deleted but it rendered the os useless.

Thanks for your help and I'll be using "rm *" from now on.



On Fri, Apr 18, 2008 at 6:18 AM, George Borisov <gb.lists.07@gmail.com> wrote:

Sharninder wrote:


A simple rm should not have removed user commands which are in other directories. There must be something else wrong. In any case if you really have lost the binaries there is not much that you can do at this point.




One possible scenario is that something "clever" was done, like aliasing "rm" to "rm -r".



But yes, if you managed to recursively delete your root directory tree then a restore from backup / rebuild is on the cards.





George.





--

To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 04-22-2008, 09:20 PM
"Damon L. Chesser"
 
Default removed root directory files

Abraham Chaffin wrote:

I didn't do "rm -r" just "rm /*" I was root when I executed this command.
Ended up reinstalling the os, luckily there wasn't much on the machine
and was really just a backup so nothing was lost.

Not sure what it deleted but it rendered the os useless.

Thanks for your help and I'll be using "rm *" from now on.



On Fri, Apr 18, 2008 at 6:18 AM, George Borisov <gb.lists.07@gmail.com
<mailto:gb.lists.07@gmail.com>> wrote:


Sharninder wrote:

A simple rm should not have removed user commands which are in
other directories. There must be something else wrong. In any
case if you really have lost the binaries there is not much
that you can do at this point.


One possible scenario is that something "clever" was done, like
aliasing "rm" to "rm -r".

But yes, if you managed to recursively delete your root directory
tree then a restore from backup / rebuild is on the cards.


George.



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org

<mailto:debian-user-REQUEST@lists.debian.org> with a subject of
"unsubscribe". Trouble? Contact listmaster@lists.debian.org
<mailto:listmaster@lists.debian.org>


If it makes you feel better, I once needed to make a swap file, so I
mkswap / !!!!


It works! It will make your / into swap. Then as you close apps, you
will not be able to open them back up, or call new ones. Root! Respect it.


--
Damon L. Chesser
damon@damtek.com
http://www.linkedin.com/in/dchesser


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 04-23-2008, 08:33 AM
Tzafrir Cohen
 
Default removed root directory files

On Tue, Apr 22, 2008 at 02:02:45PM -0700, Abraham Chaffin wrote:
> I didn't do "rm -r" just "rm /*" I was root when I executed this command.
> Ended up reinstalling the os, luckily there wasn't much on the machine and
> was really just a backup so nothing was lost.
> Not sure what it deleted but it rendered the os useless.
>
> Thanks for your help and I'll be using "rm *" from now on.

If the '*' is the last character, try typing M-* (Esc-shift-8) after it,
to expand it before running the command.

--
Tzafrir Cohen | tzafrir@jabber.org | VIM is
http://tzafrir.org.il | | a Mutt's
tzafrir@cohens.org.il | | best
ICQ# 16849754 | | friend


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 11:38 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org