It is currently Thu 23 Feb - 11:42 | Log in to check your private messages
View unanswered posts
LINUX-TRACK Forum IndexLINUX-TRACK Forum Index
Memberlist Usergroups Register Log in

[history] Vider historique | terminal | sh
Post new topic   Reply to topic    LINUX-TRACK Forum Index » /Faire ses premiers pas » Avec la ligne de commande
Previous topic | Next topic  
Author Message
Otsoa


Offline

Joined: 08 Apr 2011
Posts: 158
Localisation: Univers
Masculin Vierge (24aoû-22sep)
OS: Fedora

PostPosted: Fri 27 Jan - 12:26    Post subject: [history] Vider historique | terminal | sh Reply with quote

Il arrive parfois que par mégarde, fatigue ou tout simplement bêtise, l'on tape son mot de passe root directement comme si c'était une commande.

Que faire alors?

Il est possible d'éditer.
Code:

~/.bash_history


Et de supprimer son contenu.

En tapant
Code:
history


On a l'ensemble de l'historique avec un numéro devant chaque commande.

Avec
Code:
history -c
on efface l'ensemble de cet historique.

Avec
Code:
history -d NUMERO_DE_COMMANDE



On efface simplement la commande correspondant au numéro NUMERO_DE_COMMANDE de l'historique.

On peut faire aussi :

Code:
shred ~/.bash_history && killall -9 bash.


Voir http://doc.ubuntu-fr.org/shred pour ceux qui ne connaissent pas cette commande.

Pour plus d'informations :

Code:
help history

____________________________


...
Back to top
Inazo


Online

Joined: 21 Jun 2011
Posts: 153

PostPosted: Fri 27 Jan - 13:20    Post subject: [history] Vider historique | terminal | sh Reply with quote

Salut,

Merci pour l'info ne pas hésiter dans certain environnement critique à mettre la suppression de l'historique à chaque déconexion.


A+
____________________________
42


...
Visit poster’s website
Back to top
Post new topic   Reply to topic    LINUX-TRACK Forum Index » Avec la ligne de commande
Display posts from previous:   
 
 
All times are GMT + 1 Hour
Jump to:  

Page 1 of 1



Portal | Index | Administration Panel | Forum hosting | Free support forum | Free forums directory | Report a violation | Conditions générales d'utilisation
© created by coyotus