Results 1 to 9 of 9
  1. #1

    How to find out time when a command executed

    Hi All,

    Is there any way to find out the time when a command was executed from the hostory logs?

  2. #2
    Or is there any other way?

  3. #3
    Join Date
    Jun 2006
    Posts
    31
    AdminSami :

    export HISTTIMEFORMAT="%b %e - %H:%M:%S "
    should give you more details when you issue history command. The output should be like :

    1005 Nov 24 - 01:56:15 history
    1006 Nov 24 - 01:57:17 ls -al
    1007 Nov 24 - 01:57:20 history

    for further information , read the bash manual.

  4. #4
    u gotta update bash to latest version...

  5. #5
    Hi SecFilter,

    I issued the command line you supplied and typed the command history. It is still showing as earlier. Am I doing something wrong?

  6. #6
    Any one has any idea?

  7. #7
    anyone? I am lost

  8. #8
    Join Date
    May 2006
    Location
    India
    Posts
    661
    Quote Originally Posted by adminsami
    Hi SecFilter,

    I issued the command line you supplied and typed the command history. It is still showing as earlier. Am I doing something wrong?
    Only bash versions above 3.00 support HISTTIMEFORMAT. Check version on your machine.
    --
    [[email protected] ~]# bash -version
    GNU bash, version 3.00.0(1)-release (i686-pc-linux-gnu)
    Copyright (C) 2004 Free Software Foundation, Inc.
    [[email protected] ~]#
    --
    Last edited by SparkSupport; 12-08-2006 at 11:08 AM.
    SparkSupport.Com - The Premier Tech Company
    Cloud Solutions|Email Infra setup|VOIP|Video Streaming|Software Development
    Email: [email protected] Phone : 1- 408-600-1449 | Skype : shijils

  9. #9
    Thanks spark a lot!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •