I've recently upgraded from 13.04 to 13.10 and realized my terminal bash history is not surviving reboots.
cat ~/.bash_history gave me a permissions denied error.
I, possibly unnecessarily or wrongly, issued a chmod 777 ~/.bash_history to see if that would help...and although I could then cat and read some contents it contained not much of anything as far as history.
Hi would like to ask if there is anyway to display .bash_history with timestamp using shell script?
i know that you should use history command with
HISTTIMEFORMAT="%d/%m/%y %T "
to display it in terminal but it does not work when i use it on shell script. It seem that you can't run history command on script.
To prevent logging dangerous commands in bash history, I have added following line to my .bashrc file:
HISTIGNORE='rm *:mv *:cp *:cat*>*:pv*>*'
this works well, but it has a side effect: I cannot see the complete history of commands executed on a machine. Let's say I have several machines for experiments, and I want to be able to see all commands executed.
I want to see all bash commands that have been run on a Linux server across multiple user accounts. The specific distribution I'm using is CentOS 5.7. Is there a way to globally search .bash_history files on a server or would it be a more home-grown process of locate | cat | grep? (I shudder just typing that out).
a directory was moved with mv command in a Linux box, what logs should be looked at for such action? in root bash_history i can see the command was used, unfortunatly bash_history was not recording time & date, therefore making it difficult to trace.
My need is :
1. To know who , when , which command used.
2. Local user should not delete this information.
[The thing is , here we have a number of employees working in root permission.!!! And we are not actually getting who is doing which command and all...]
I mean , with an example , i can say
i have a user user1
i need to give all the following permissions to user1, :