Where is saved the commands that I issue every day as root and as a regular user ?

Hello.

Coming from Ubuntu If I want to have the list of the every command that I have issued during the job session I read the file called .bash_history. This file is located on /home/user and on /root. Nothing can be easier. What about FreeBSD ? Where the root and regular user commands are saved ? (I'm using the csh shell)
 
for csh (the default shell) it's $HOME/.history
if you changed your default shell to bash, it will be in .bash_history
ls -altr shows you all the files including ones starting with a "."

But of course some folks say that saving your commands to a history file is a potential security risk. :)
 
It's not about being FreeBSD, it's about the shell used. A good tip is using something like this:
Code:
ls $HOME/*history*
 
  • Like
Reactions: mer
It didn't save the commands that I have issued as a default user. On /home/marietto there isn't any .history file and under /root the .history file is partially full with the commands that I have issued. On /root ; I have a lot of .history* files,but a lot of them are empty.
 
Back
Top