» Linux » Examen sur Linux » Examen 201 : Advanced Administration » Section 5 » Question 12/23
12.You are running out of space in your home directory. While looking for files to delete or compress you find a large file called .bash_history and delete it. A few days later, it is back and as large as before. What do you need to do to ensure that its size is smaller?

Set the HISTFILESIZE variable to a smaller number.
Set the HISTSIZE to a smaller number.
Set the NOHISTFILE variable to true.
Set the HISTAPPEND variable to true.

Explanation: The bash_history file is a file in a user's home directory that contains a list of the (recent) commands issued by this user at the bash command line. This file can grow to up to the number of lines specified in the HISTFILESIZE variable; therefore, to reduce the maximum size of the file, you should set the HISTFILESIZE variable to a smaller number.

Reference: http://www.slug-vt.org/bash.html

Incorrect Answers
B: The HISTSIZE variable contains the number of commands in the history. When a user logs off, the commands are written to the bash_history file.
C: There is no NOHISTFILE variable.
D: If the HISTAPPEND variable is set to true, the history will be appended to the history file bash_history),otherwise the file will be overwritten. Therefore, setting the HISTAPPEND variable to false, not true would work.

« Question 11 Question 13 »