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 ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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. |
| |||
| 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 |
| |||
| 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. |
| ||||
| 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... |