LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   About history command (https://www.linuxquestions.org/questions/linux-general-1/about-history-command-4175450387/)

linux_world 02-16-2013 02:30 AM

About history command
 
Hi There,

how to show date and time in history command, and the same need to be set for more than 100 users at a time, so they can see history with date and time details..


Thanks!
Jitesh

druuna 02-16-2013 04:02 AM

Have a look at the bash man page (look for HISTTIMEFORMAT).

Adding the following to /etc/bashrc (or equivalent) will make it global for all users:
Code:

export HISTTIMEFORMAT='%F %T '

kooru 02-17-2013 03:30 AM

Quote:

Originally Posted by linux_world (Post 4892799)
Hi There,

how to show date and time in history command, and the same need to be set for more than 100 users at a time, so they can see history with date and time details..


Thanks!
Jitesh

Hi, linuxquestions already said :)
for all users, as said from druuna modifty the global file /etc/bashrc and not .bashrc (file that you find under each user's /home)


All times are GMT -5. The time now is 06:01 PM.