Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
quando parte l'indice su rm !!!
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
Tiro
l33t
l33t


Joined: 14 Feb 2003
Posts: 752
Location: italy

PostPosted: Fri May 21, 2004 5:48 pm    Post subject: quando parte l'indice su rm !!! Reply with quote

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! :lol:

Qualche consiglio per un ripristino abbastanza indolore..?
Back to top
View user's profile Send private message
FonderiaDigitale
Veteran
Veteran


Joined: 06 Nov 2003
Posts: 1710
Location: Rome, Italy

PostPosted: Fri May 21, 2004 5:53 pm    Post subject: Reply with quote

intanto comincia a fare un alias.
Code:
nano /etc/bashrc

inserendo
Code:
alias rm='rm -i'
alias cp='cp -i'

come in redhat, ti chiede conferma ogni volta. indispensabile nel tuo caso 8)
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
Code:
emerge -e world

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
View user's profile Send private message
Tiro
l33t
l33t


Joined: 14 Feb 2003
Posts: 752
Location: italy

PostPosted: Fri May 21, 2004 6:29 pm    Post subject: Reply with quote

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:
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 31455
Location: here

PostPosted: Fri May 21, 2004 7:42 pm    Post subject: Reply with quote

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
View user's profile Send private message
Tiro
l33t
l33t


Joined: 14 Feb 2003
Posts: 752
Location: italy

PostPosted: Sat May 22, 2004 9:47 am    Post subject: Reply with quote

parole sante...!!!! :D
Back to top
View user's profile Send private message
kaosone
Guru
Guru


Joined: 01 Feb 2004
Posts: 446

PostPosted: Sat May 22, 2004 11:44 am    Post subject: Reply with quote

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 :)
Back to top
View user's profile Send private message
FonderiaDigitale
Veteran
Veteran


Joined: 06 Nov 2003
Posts: 1710
Location: Rome, Italy

PostPosted: Sat May 22, 2004 12:55 pm    Post subject: Reply with quote

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
View user's profile Send private message
kaosone
Guru
Guru


Joined: 01 Feb 2004
Posts: 446

PostPosted: Sat May 22, 2004 5:18 pm    Post subject: Reply with quote

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 8)
Back to top
View user's profile Send private message
tolipth
Guru
Guru


Joined: 01 Dec 2003
Posts: 301

PostPosted: Sat May 22, 2004 6:36 pm    Post subject: Reply with quote

kaosone wrote:
e se devi cancellare una cartella intera devi dare ogni volta yes? :|

se non ricordo male:
Code:

rm -rf
Back to top
View user's profile Send private message
motaboy
Retired Dev
Retired Dev


Joined: 15 Dec 2003
Posts: 1483

PostPosted: Sat May 22, 2004 11:10 pm    Post subject: Reply with quote

Oppure, in modo più elegante, metti in pipe il comando yes.
Per esempio:

Code:

yes | rm -r ....


Bye!
_________________
...
Back to top
View user's profile Send private message
FonderiaDigitale
Veteran
Veteran


Joined: 06 Nov 2003
Posts: 1710
Location: Rome, Italy

PostPosted: Sun May 23, 2004 7:11 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum