Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Risolto] Ripulire bash_history
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
Galanti Davide
Tux's lil' helper
Tux's lil' helper


Joined: 23 Feb 2006
Posts: 148
Location: Milano (Italy)

PostPosted: Wed Mar 15, 2006 4:22 pm    Post subject: [Risolto] Ripulire bash_history Reply with quote

Volevo sapere se era possibile fare in modo che al logout di un utente, la sua bash_history si pulisca in maniera automatica

Last edited by Galanti Davide on Wed Mar 15, 2006 4:51 pm; edited 1 time in total
Back to top
View user's profile Send private message
Luca89
Advocate
Advocate


Joined: 27 Apr 2005
Posts: 2107
Location: Agrigento (Italy)

PostPosted: Wed Mar 15, 2006 4:32 pm    Post subject: Reply with quote

Basta inserire nel file "~/.bash_logout":
Code:
rm -f ~/.bash_history

_________________
Running Fast!
Back to top
View user's profile Send private message
Ilvalle
Guru
Guru


Joined: 07 Mar 2005
Posts: 325
Location: Gallarate - ITALY

PostPosted: Wed Mar 15, 2006 4:34 pm    Post subject: Reply with quote

puoi eliminare il file scrivendo qualcosa nel ~/.bash_logout
tipo
Code:
 [[ -f ~/.bash_history ]] && rm -f ~/.bash_history


Ciao
Back to top
View user's profile Send private message
Galanti Davide
Tux's lil' helper
Tux's lil' helper


Joined: 23 Feb 2006
Posts: 148
Location: Milano (Italy)

PostPosted: Wed Mar 15, 2006 4:50 pm    Post subject: Reply with quote

Vi ringrazio a entrambi :)

Avevo in mente che si facesse così, ma volevo avere conferma essendo alle prime armi e non volendo creare "casini"
Back to top
View user's profile Send private message
Cazzantonio
Bodhisattva
Bodhisattva


Joined: 20 Mar 2004
Posts: 4514
Location: Somewere around the world

PostPosted: Wed Mar 15, 2006 5:33 pm    Post subject: Reply with quote

è che per tante cose non c'è un "si fa così".... si può pensare a tante soluzioni alcune semplici e altre meno
_________________
Any mans death diminishes me, because I am involved in Mankinde; and therefore never send to know for whom the bell tolls; It tolls for thee.
-John Donne
Back to top
View user's profile Send private message
fabius
Guru
Guru


Joined: 29 Nov 2004
Posts: 525

PostPosted: Fri Mar 17, 2006 9:05 pm    Post subject: Reply with quote

Se proprio non vuoi il file di history basta impostare la variabile ambiente
Code:
HISTFILE=""

In questo modo esiste solo la history della shell aperta (in memoria)
Back to top
View user's profile Send private message
Galanti Davide
Tux's lil' helper
Tux's lil' helper


Joined: 23 Feb 2006
Posts: 148
Location: Milano (Italy)

PostPosted: Fri Mar 17, 2006 9:37 pm    Post subject: Reply with quote

fabius wrote:
Se proprio non vuoi il file di history basta impostare la variabile ambiente
Code:
HISTFILE=""

In questo modo esiste solo la history della shell aperta (in memoria)


Ecco così è ancora meglio :)
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