For the duplicate commands I believe you can add :
Code:
export HISTCONTROL=ignoredups
... somewhere in your bashrc or similar
For the size of .bash_history, I don't know, are the 900 lines filled with only commands,
no timestamp ?
[edit]
From man bash :
Code:
HISTFILESIZE
The maximum number of lines contained in the history file. When
this variable is assigned a value, the history file is trun-
cated, if necessary, to contain no more than that number of
lines. The default value is 500. The history file is also
truncated to this size after writing it when an interactive
shell exits.
So you have to exit the shell for the history file be trucated to 500 lines