LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 02-16-2013, 02:30 AM   #1
linux_world
LQ Newbie
 
Registered: Feb 2013
Location: Mumbai
Posts: 3

Rep: Reputation: Disabled
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
 
Old 02-16-2013, 04:02 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371
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 '
 
1 members found this post helpful.
Old 02-17-2013, 03:30 AM   #3
kooru
Senior Member
 
Registered: Sep 2012
Location: Italy
Distribution: Slackware, NetBSD
Posts: 1,101
Blog Entries: 3

Rep: Reputation: 237Reputation: 237Reputation: 237
Quote:
Originally Posted by linux_world View Post
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)

Last edited by kooru; 02-17-2013 at 03:32 AM.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
History command loveulinux Linux - Newbie 8 11-14-2011 11:19 AM
[SOLVED] Is there any command to delete bash command history? cola Linux - Newbie 4 06-01-2010 07:32 AM
history command in hp ux abhijeetdutta Other *NIX 4 12-18-2009 10:09 AM
URGENT! Is there any command to get a history command lines and time in SUSE Linux.? igsoper Linux - Software 5 06-25-2009 02:14 AM
History command amer_58 Linux - General 5 06-24-2005 12:26 PM


All times are GMT -5. The time now is 08:03 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration