LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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
  Search this Thread
Old 10-28-2009, 03:25 AM   #1
dlugasx
Member
 
Registered: Dec 2008
Location: Germany/Poland
Distribution: CentOS / Debian / Solaris / RedHat
Posts: 266

Rep: Reputation: 19
how to put date and timestamp to bash_history ?


Hi all,

question like in the subject.

how to put date and timestamp to bash_history ?

I havent seen any good informations on the google.


help...


Dlugasx
 
Old 10-28-2009, 03:38 AM   #2
rhadmn
Member
 
Registered: Oct 2009
Location: Bangalore
Distribution: Redhat Linux, Solaris, CentOS
Posts: 35

Rep: Reputation: 1
Hi Dlugasx,

Actually i dint understand your question.As for the other files in the LINUX, .bash_profile will also be having a date & timestamp.Kind request to please describe your query/issue u r facing in detail...

Regards,
RHADMN
 
Old 10-28-2009, 03:45 AM   #3
dlugasx
Member
 
Registered: Dec 2008
Location: Germany/Poland
Distribution: CentOS / Debian / Solaris / RedHat
Posts: 266

Original Poster
Rep: Reputation: 19
Quote:
Originally Posted by rhadmn View Post
Hi Dlugasx,

Actually i dint understand your question.As for the other files in the LINUX, .bash_profile will also be having a date & timestamp.Kind request to please describe your query/issue u r facing in detail...

Regards,
RHADMN

If You know what for is bash_history, its easy to understand.



try to execute command: history

do You see when each command has been executed ?


1001 2008-07-31 19:42:46 command1
1002 2008-07-31 19:42:54 command2
1003 2008-07-31 19:43:00 command3
1004 2008-07-31 19:43:25 ...



I have found nice tutorial how to format bash_profile.


Thanks! Post is solved...



http://www.zarrelli.org/blog/2008/07...y-time-format/
 
Old 10-28-2009, 05:03 AM   #4
rhadmn
Member
 
Registered: Oct 2009
Location: Bangalore
Distribution: Redhat Linux, Solaris, CentOS
Posts: 35

Rep: Reputation: 1
History With Date/Time Stamp

Quote:
Originally Posted by dlugasx View Post
If You know what for is bash_history, its easy to understand.



try to execute command: history

do You see when each command has been executed ?


1001 2008-07-31 19:42:46 command1
1002 2008-07-31 19:42:54 command2
1003 2008-07-31 19:43:00 command3
1004 2008-07-31 19:43:25 ...



I have found nice tutorial how to format bash_profile.


Thanks! Post is solved...



http://www.zarrelli.org/blog/2008/07...y-time-format/


Thanks for the info !!
 
Old 10-28-2009, 03:59 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Note thought that while this web log presents its solution, which you could get from reading the Bash manual page anyway, in a next best thing to sliced bread kind of way it fails to mention that this will only work with recent Bash versions. It is not backward compatible as well.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Add a timestamp to photos by reading the file date...? FSHero Linux - Software 4 09-14-2007 12:15 AM
How to get date from unix timestamp ruj.sabya Linux - General 9 03-22-2007 05:59 PM
Insert date and timestamp Into File name petenyce Linux - Newbie 9 10-13-2005 12:16 PM
adding date timestamp to filename markraem Solaris / OpenSolaris 2 11-17-2004 08:32 AM
Converting the date (not timestamp) mpgram Programming 2 04-18-2004 03:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:52 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration