In NetBSD /bin/sh
is a modified version of the Almquist shell. With the command fc -l
it is possible to view the last 16 commands typed in the prompt in the current session and not the older ones.
The environment variable HISTSIZE
is set at 1000 and in bash
this means that the last 1000 commands (whether or not they were typed in the current session) are saved in a file named .bash_history
in the home directory. But here it seems to mean just that the last 1000 commands in this session are keeped in the history, and the history does not seem to be saved in a file.
I am looking for a history which allows not only to read the last commands of the current session, but also the commands of the previous sessions (for example, the previous time I started the system, not the actual time). Does /bin/sh
in NetBSD have by default such an history? If not, is it possible to create such an history in that shell?
Best Answer
I don't really understand your question, what's the actual question?
First you are stating that you can access the history via the
fc
builtin and then you are asking if the shell implements a history?Furthermore, the
man page
states:and
If your question is whether history gets written to a file, it does not seem to be the case.