jueves, 1 de septiembre de 2011

LINUX: ver la fecha y hora de un comando en el history

Agregar la siguiente línea en el .bashrc o .bash_profile

export HISTTIMEFORMAT="%F %T "


cargar el archivo nuevamente con source .bashrc

al ejecutar el history aparece la fecha y hora automágicamente para el historial de comandos...

2001 2011-09-01 00:47:56 vi .bashrc
2002 2011-09-01 00:48:17 source .bashrc
2003 2011-09-01 00:48:20 history
2004 2011-09-01 00:49:22 cat .bashrc
2005 2011-09-01 00:49:52 history
2006 2011-09-01 00:51:15 cat .bashrc
2007 2011-09-01 00:54:02 history

No hay comentarios:

Publicar un comentario