Results 1 to 10 of 12
Hi, All!
less doesn't save command history, i.e. file .lesshst isn't created. If I create it manually, nothing writes to it too.
Permissions to home directory is drwxr-xr-x
>env | ...
- 08-13-2010 #1Just Joined!
- Join Date
- Aug 2010
- Posts
- 4
less doesn't save command history
Hi, All!
less doesn't save command history, i.e. file .lesshst isn't created. If I create it manually, nothing writes to it too.
Permissions to home directory is drwxr-xr-x
>env | grep -i less
LESSHISTSIZE=100
PAGER=less
LESS=-N -P%f
LESSHISTFILE=$HOME/.lesshst
Maybe somebody faced with such problem.
OS AIX 5.3 -- I think linux users can have the same issue, hardly this issue depends on OS.
Thanks in advance.
- 08-13-2010 #2Just Joined!
- Join Date
- Apr 2010
- Location
- Central Kansas
- Posts
- 13
do a cat .bash_history at command prompt
- 08-13-2010 #3Just Joined!
- Join Date
- Jun 2007
- Posts
- 16
- 08-14-2010 #4Just Joined!
- Join Date
- Apr 2010
- Location
- Central Kansas
- Posts
- 13
I did the cat .bash_history to show where the commands were stored.
- 08-15-2010 #5
On my system $LESSHISTFILE is empty. You might try to set this variable to nothing, too, because it points to the default location anyway.
I don't know whether seeing $HOME in the value of $LESSHISTFILE is normal. I'd expect see the real path there. Is this is original value of this variable (set at the installation) or do you initialize it explicitly in some startup file?
- 08-15-2010 #6
- 08-15-2010 #7Just Joined!
- Join Date
- Apr 2010
- Location
- Central Kansas
- Posts
- 13
My mistake.
- 08-16-2010 #8Just Joined!
- Join Date
- Aug 2010
- Posts
- 4
Hello!
After removing $LESSHISTFILE result persisted the same.
>env | grep -i less
PAGER=less
LESS=-N -P%f
"!less" is executed correctly. Commands to .bash_history are written correctly. But less commands(generally I need search commands) don't write to .lesshst.
- 08-16-2010 #9
- 08-17-2010 #10Just Joined!
- Join Date
- Aug 2010
- Posts
- 4
>echo $LESSHISTFILE
>


Reply With Quote
