Here is my Controlled Assessment:
Show and explain the content of the file that contains the Bash history.
ls -a, but all it did was show files called Bash History which I couldn't open :(
So how do I do it then?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
To show the history in
This will show the (in memory) history of the current shell.
$ cat "$HISTFILE"
This will output the history saved to this file by previous
bash sessions when they have exited (or written to the file under other circumstances).
bash manual and search for variables therein that start with
HIST. These affect the format of the output of the
history command and the location and size of the history file as well as what is put into it.
You should also consult the same manual for an explanation of the
history command and when the history gets written to the history file (search the manual for
history -s). Also read the section called