Home » LPI » 117-201 » What do you need to do to ensure that its size is smaller?
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?
A. Set the HISTFILESIZE variable to a smaller number.
B. Set the HISTSIZE to a smaller number.
C. Set the NOHISTFILE variable to true.
D. Set the HISTAPPEND variable to true.
Correct Answer: A
Explanation/Reference:
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.
Download Printable PDF. VALID exam to help you PASS.
|
|