Unix Technical Forum

broke AIX but how?

This is a discussion on broke AIX but how? within the AIX Operating System forums, part of the Unix Operating Systems category; --> I ran the following in /tmp to clean out old files: find /tmp/. -mtime +30 -prune -type f –exec ...


Go Back   Unix Technical Forum > Unix Operating Systems > AIX Operating System

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-05-2008, 03:22 AM
mdchachi
 
Posts: n/a
Default broke AIX but how?

I ran the following in /tmp to clean out old files:

find /tmp/. -mtime +30 -prune -type f –exec rm -f {} \;

the next thing I know, major portions of /etc are gone including
rc.d, inittab, groups, resolv.conf, etc. Needless to say it was a long night.

But I don't get it. Even if there were soft links in tmp, find
shouldn't follow them. Can anybody tell me what happened?

Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-05-2008, 03:22 AM
Laurenz Albe
 
Posts: n/a
Default Re: broke AIX but how?

mdchachi <mdchachi@chachich.com> wrote:
> I ran the following in /tmp to clean out old files:
>
> find /tmp/. -mtime +30 -prune -type f ?exec rm -f {} \;
>
> the next thing I know, major portions of /etc are gone


I assume you mean '-' and not '?'.

The statement looks harmless enough; the -prune is a little weird, but
cannot do damage.
Not even a hard link to a directory could be the cause, as this does
not work across file systems.

Is there a chance to retrieve the statement you actually typed from
root's command history? There might have been a typo...

Yours,
Laurenz Albe
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-05-2008, 03:22 AM
Patrick Begou
 
Posts: n/a
Default Re: broke AIX but how?

Are you sure that you do not insert a space character between "/tmp" and
"/." inadvertantly ?

or between "/tmp/" and "." ?

mdchachi wrote:
> I ran the following in /tmp to clean out old files:
>
> find /tmp/. -mtime +30 -prune -type f –exec rm -f {} \;
>
> the next thing I know, major portions of /etc are gone including
> rc.d, inittab, groups, resolv.conf, etc. Needless to say it was a long night.
>
> But I don't get it. Even if there were soft links in tmp, find
> shouldn't follow them. Can anybody tell me what happened?
>
> Thanks.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-05-2008, 03:22 AM
mgrd
 
Posts: n/a
Default Re: broke AIX but how?

Patrick Begou wrote:
> Are you sure that you do not insert a space character between "/tmp" and
> "/." inadvertantly ?
>
> or between "/tmp/" and "." ?


...and was your cwd /etc ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-05-2008, 03:24 AM
mdchachi
 
Posts: n/a
Default Re: broke AIX but how?

mgrd <mgrd@gmx.net> wrote in message news:<2s089nF1fnd67U1@uni-berlin.de>...
> Patrick Begou wrote:
> > Are you sure that you do not insert a space character between "/tmp" and
> > "/." inadvertantly ?
> >
> > or between "/tmp/" and "." ?

>
> ..and was your cwd /etc ?


Thanks for your replies. Actually I didn't run the command directly,
I gave it to a sys admin to run and wasn't with him at the time. So I
suppose it's possible that he inserted a space in there. It's the
only thing that makes sense...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:06 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com