DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 30th May 2008
audio audio is offline
Port Guard
 
Join Date: May 2008
Posts: 17
Default Timestamps for commands in .history file?

Is it possible to have timestamps for commands in the .history file using FreeBSD's default shell like you can for Linux? If so, how? I don't want to have to keep translating Epoch time.

Last edited by audio; 30th May 2008 at 06:27 PM.
Reply With Quote
  #2   (View Single Post)  
Old 30th May 2008
richardpl richardpl is offline
Spam Deminer
 
Join Date: May 2008
Location: Croatia
Posts: 284
Default

tcsh(1)

it is all explained under line
Code:
history -c (+)
Reply With Quote
  #3   (View Single Post)  
Old 31st May 2008
audio audio is offline
Port Guard
 
Join Date: May 2008
Posts: 17
Default

Thanks, now I can type "history -T" and it will include the time the command was run, but not the date, but I'm getting closer. Is there a way to include the date? It would also be nice if it could do all of this by default in the actual .history file, rather than having to use the history command...
Reply With Quote
  #4   (View Single Post)  
Old 31st May 2008
richardpl richardpl is offline
Spam Deminer
 
Join Date: May 2008
Location: Croatia
Posts: 284
Default

Why you did not do your homework? Homework was study tcsh manpage.

I will help you, because I'm nice person.

% set savehist = (2000 merge)

Time in .history will be represented in seconds since UNIX Epoch.

Then you can write your own history command which will transform that obscure seconds in more friendly format (for n00bs).
Reply With Quote
Reply

Thread Tools
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
brief incomplete and mostly wrong history of programming languages TerryP Off-Topic 2 9th May 2009 11:05 PM
History not saved in tcsh RandomSF FreeBSD General 8 9th December 2008 11:59 PM
working with .profile and history uptonm OpenBSD Security 1 15th August 2008 12:14 PM
weird history problem mmusang FreeBSD General 2 17th May 2008 07:07 PM


All times are GMT. The time now is 08:04 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick