View previous topic :: View next topic |
Author |
Message |
Tiro l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/1106020249424dc447a108b.jpg)
Joined: 14 Feb 2003 Posts: 752 Location: italy
|
Posted: Fri May 21, 2004 5:48 pm Post subject: quando parte l'indice su rm !!! |
|
|
aiuto!
mi è partito il dito su rm -rv /etc cacchio e prontamente ctrl-c ma ho fatto cmq un bel pò di danni! Ad esempio xterm non mi parte più...l'ho riemerso ma non va...e me ne è rimasto solo uno!
Qualche consiglio per un ripristino abbastanza indolore..? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
FonderiaDigitale Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/160661570245a62657b3321.jpg)
Joined: 06 Nov 2003 Posts: 1710 Location: Rome, Italy
|
Posted: Fri May 21, 2004 5:53 pm Post subject: |
|
|
intanto comincia a fare un alias.
inserendo
Code: | alias rm='rm -i'
alias cp='cp -i' |
come in redhat, ti chiede conferma ogni volta. indispensabile nel tuo caso
Code: | chmod a+x /etc/bashrc
ln -s /etc/bashrc /root/.bashrc
ln -s /etc/bashrc /home/utente/.bashrc
|
cosi che lo usi.
purtroppo nel tuo caso serve un
e serve anche che non stai root se non e' veramente necessario. _________________ Come disse un amico, i sistemisti sono un po' come gli artigiani per l'informatica
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Tiro l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/1106020249424dc447a108b.jpg)
Joined: 14 Feb 2003 Posts: 752 Location: italy
|
Posted: Fri May 21, 2004 6:29 pm Post subject: |
|
|
NOOOO...era quello che non volevo vedermi scritto!!!
cacchio....
...avevo proprio ieri un backup della /etc e poi mi sono detto...la cancello tanto non sarò così tanto imbranato da averne bisogno!
e invece...grrrr!!! ![Twisted Evil :twisted:](images/smiles/icon_twisted.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
fedeliallalinea Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/161653968057192eb39329f.jpg)
Joined: 08 Mar 2003 Posts: 31471 Location: here
|
Posted: Fri May 21, 2004 7:42 pm Post subject: |
|
|
Tiro wrote: | ...avevo proprio ieri un backup della /etc e poi mi sono detto...la cancello tanto non sarò così tanto imbranato da averne bisogno! |
Mai cancellare i backup piuttosto butta via un cd e copiali li. _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Tiro l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/1106020249424dc447a108b.jpg)
Joined: 14 Feb 2003 Posts: 752 Location: italy
|
Posted: Sat May 22, 2004 9:47 am Post subject: |
|
|
parole sante...!!!! ![Very Happy :D](images/smiles/icon_biggrin.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
kaosone Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/163872956741f57be986f19.jpg)
Joined: 01 Feb 2004 Posts: 446
|
Posted: Sat May 22, 2004 11:44 am Post subject: |
|
|
avevo letto da quelche parte un bel consiglio
touchare un file con nome -i nelle directory piu' importanti
cd / && touch -- -i
cosi' un eventuale rm -rf / chiedera' conferma prima di cancellare ![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
FonderiaDigitale Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/160661570245a62657b3321.jpg)
Joined: 06 Nov 2003 Posts: 1710 Location: Rome, Italy
|
Posted: Sat May 22, 2004 12:55 pm Post subject: |
|
|
troppo macchinoso.
fai come ho descritto sopra. _________________ Come disse un amico, i sistemisti sono un po' come gli artigiani per l'informatica
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
kaosone Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/163872956741f57be986f19.jpg)
Joined: 01 Feb 2004 Posts: 446
|
Posted: Sat May 22, 2004 5:18 pm Post subject: |
|
|
e se devi cancellare una cartella intera devi dare ogni volta yes?
postresti fare /usr/bin/mv ma a quel punto hai il problema di prima
per me e' una buona idea quella del file ![Cool 8)](images/smiles/icon_cool.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
tolipth Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 01 Dec 2003 Posts: 301
|
Posted: Sat May 22, 2004 6:36 pm Post subject: |
|
|
kaosone wrote: | e se devi cancellare una cartella intera devi dare ogni volta yes?
|
se non ricordo male:
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
motaboy Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/146642313240262a7185133.png)
Joined: 15 Dec 2003 Posts: 1483
|
Posted: Sat May 22, 2004 11:10 pm Post subject: |
|
|
Oppure, in modo più elegante, metti in pipe il comando yes.
Per esempio:
Bye! _________________ ... |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
FonderiaDigitale Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/160661570245a62657b3321.jpg)
Joined: 06 Nov 2003 Posts: 1710 Location: Rome, Italy
|
Posted: Sun May 23, 2004 7:11 am Post subject: |
|
|
si ma usalo con parsimonia, visti i trascorsi. _________________ Come disse un amico, i sistemisti sono un po' come gli artigiani per l'informatica
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|