# ~/.bashrc : history : date/heure de chaque ligne de commande(s)

**URL:** <https://www.debian-fr.org/t/bashrc-history-date-heure-de-chaque-ligne-de-commande-s/74910>\
**Category:** Trucs et Astuces\
**Created:** [Octobre 27, 2017, 4:48 UTC](https://www.debian-fr.org/t/bashrc-history-date-heure-de-chaque-ligne-de-commande-s/74910 "2017-10-27T16:48:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon29980398](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/a/f4b2a3/32.png) [@anon29980398](https://www.debian-fr.org/u/anon29980398)\
**Post date:** [Octobre 27, 2017, 4:48 UTC](https://www.debian-fr.org/t/bashrc-history-date-heure-de-chaque-ligne-de-commande-s/74910/1 "2017-10-27T16:48:08Z")

</div>

Pour avoir la **date/heure** des lignes de commande(s) enregistrées dans le fichier **~/.bash\_history**  
j’ai ajouté cette variable dans **~/.bashrc**

```bash
# Format d'affichage date/heure des lignes de commandes
# qui seront enregistrées dans ~/.bash_history
HISTTIMEFORMAT="%d-%m-%Y %T "

```

Ce qui donne :

```nohighlight
michel@debg53sw:~$ history 2
  999 17/02/2018 08:11:34 history 10
 1000 17/02/2018 08:59:47 history 2
michel@debg53sw:~$ 

```
