Pagina 1 di 1

bash

Inviato: mer 30 mar 2005, 21:40
da samiel
Ma qualcuno sa dov´è settato il valore della history
<BR>della bash, insomma quella che dà echo $HISTSIZE ?
<BR>
<BR>Grazie
<BR>M.
<BR><br>

bash

Inviato: mer 30 mar 2005, 23:22
da kyakan
Di default è 500, probabilmente puoi settarlo nel profile ...<br>

bash

Inviato: mer 30 mar 2005, 23:26
da samiel
Lo so, ma non capisco, non riesco a trovare
<BR>dov´è settato, perché in /etc/profile
<BR>non mi pare ci sia niente relativo a 500...
<BR>
<BR>M.<br>

bash

Inviato: mer 30 mar 2005, 23:28
da useless
magari ha un default hardcoded se non lo setti explicitamente.<br>

bash

Inviato: mer 30 mar 2005, 23:31
da rob
se proprio ti dà fastidio aggiungi in ~/.bashrc
<BR>export HISTSIZE=100
<BR>...o altro valore a tua scelta
<BR>
<BR>ciao, rob<br>

bash

Inviato: gio 31 mar 2005, 10:07
da kyakan
man bash
<BR>...
<BR> HISTSIZE
<BR> The number of commands to remember in the command
<BR> history (see HISTORY below). The default value is
<BR> 500.
<BR>...
<BR>
<BR>E´ interno alla bash, altrimenti non si troverebbe nel man (credo)<br>

bash

Inviato: gio 31 mar 2005, 12:20
da gianPrazio
Confermo anch´io... tutti i riferimenti a HISTSIZE sono di bash: i sorgenti si trovano, ad esempio, per slack10.1 in bash-3.0.tar.gz... un grep mi ha dato il seguente output:
<BR>
<BR><code>
<BR>filippo@baracca:/tmp/gconfd-filippo/packages/bash-3.0$ grep -H HISTSIZE *.c *.h
<BR>bashhist.c: size of HISTSIZE if the user does not explicitly set the size
<BR>bashhist.c: set_if_not ("HISTFILESIZE", get_string_value ("HISTSIZE"));
<BR>bashhist.c: return (get_string_value ("HISTSIZE") ? history_base + where_history () : 1);
<BR>variables.c: set_if_not ("HISTSIZE", "500");
<BR>variables.c: sv_histsize ("HISTSIZE");
<BR>variables.c: { "HISTSIZE", sv_histsize },
<BR>variables.c:/* What to do after the HISTSIZE or HISTFILESIZE variables change.
<BR>variables.c: If there is a value for this HISTSIZE (and it is numeric), then stifle
<BR>filippo@baracca:/tmp/gconfd-filippo/packages/bash-3.0$
<BR></code>
<BR>
<BR>Tutti i riferimenti a HISTSIZE sono in variables.c e bashhist.c<br>