Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Want to get list of Linux commands used on specific date through HISTORY command Post 302884054 by Scott on Friday 17th of January 2014 08:42:07 AM
Old 01-17-2014
Sorry, I deleted my previous post. On OS X the default behaviour of Bash is to store the epoch in the history file for each command run, which you can then use HISTTIMEFORMAT to format the output timestamp when using the history command. On Linux (RHEL) this is not the default and I can't quite find where to set it. But if it's not set already, you have no chance of getting the information you want from that time period.

If you see something like the following (#<number), you might be OK, providing your HISTSIZE is long enough and no one has truncated the history file since the date you want:
Code:
bash-3.2$ tail -2 $HISTFILE
#1389965423
cat .bash_history

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Can I use history command to run previous commands?

Hi, I can use history command in unix to view my last 50 commands. But how can I run the previous commands easily? Can history command help? Firebird (2 Replies)
Discussion started by: firebirdonfire
2 Replies

2. Shell Programming and Scripting

Date/Time in history command

Hi, Can we display the Date/time stamp in history command Ex: $history output ----------- vi pr.sh ksh -x pr.sh ksh -n pr.sh nhoup ksh pr.sh & nohup ksh pr.sh & i want the output like this Tue Mar 14 17:18:57 GMT 2006 vi pr.sh HOSTNAME is it possible sir ???? (3 Replies)
Discussion started by: vastare
3 Replies

3. Solaris

Can history commands show what time command executed

On Solaris 8 and 10 is there a way history command can show what time a particular command was executed. Pls reply. Thanks (2 Replies)
Discussion started by: Tirmazi
2 Replies

4. Shell Programming and Scripting

history command with date

Hi All, Can i get the history command with date, so that i can know which command run at what time??? need it on urjent basis Thanks (6 Replies)
Discussion started by: aish11
6 Replies

5. Solaris

History search for specific command

How to find out history of specific command run by all users in solaris server ? (1 Reply)
Discussion started by: piyus
1 Replies

6. Shell Programming and Scripting

Need to view command in history for specific date

hi i want to find a command in history for specific date . is it possible that i can view ?? (1 Reply)
Discussion started by: scriptor
1 Replies

7. UNIX for Dummies Questions & Answers

Find Commands Run on Specific Date

Hello All, I was wondering if anyone knew of a way to find out what commands were run on a specific date. I'm looking to see if I can find certain commands that were run on 3/4, today is 3/10...? Any thoughts or ideas would be much appreciated! Thanks in Advance, Matt ----------... (3 Replies)
Discussion started by: mrm5102
3 Replies

8. UNIX for Advanced & Expert Users

Fc command does not display all commands history of a user

hi, i have an AIX6.1 machine and i modified a user's profile so that it creates history file for each ip address that connects with this user. the reason i did this is because more than 1 person connects with the same user so i want to keep track of command run by all of them. therefore, in the... (5 Replies)
Discussion started by: omonoiatis9
5 Replies

9. Shell Programming and Scripting

Date: invalid date trying to set Linux date in specific format

i try to set linux date & time in specific format but it keep giving me error Example : date "+%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01" or date +"%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01" keep giving me this error : date: invalid date ‘19-01-2017 00:05:01' Please use CODE tags... (7 Replies)
Discussion started by: umen
7 Replies

10. UNIX for Beginners Questions & Answers

History of command by date

hi unix expert how can i see the history of command that i entered in past? history (1 Reply)
Discussion started by: abdossamad2003
1 Replies
App::Cmd::Command::commands(3pm)			User Contributed Perl Documentation			  App::Cmd::Command::commands(3pm)

NAME
App::Cmd::Command::commands - list the application's commands VERSION
version 0.318 DESCRIPTION
This command plugin implements a "commands" command. This command will list all of an App::Cmd's commands and their abstracts. METHODS
execute This is the command's primary method and raison d'etre. It prints the application's usage text (if any) followed by a sorted listing of the application's commands and their abstracts. The commands are printed in sorted groups (created by "sort_commands"); each group is set off by blank lines. "sort_commands" my @sorted = $cmd->sort_commands(@unsorted); This method orders the list of commands into sets which it returns as a list of arrayrefs. By default, the first group is for the "help" and "commands" commands, and all other commands are in the second group. AUTHOR
Ricardo Signes <rjbs@cpan.org> COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Ricardo Signes. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2012-05-05 App::Cmd::Command::commands(3pm)
All times are GMT -4. The time now is 02:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy