Want to get list of Linux commands used on specific date through HISTORY command


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Want to get list of Linux commands used on specific date through HISTORY command
# 1  
Old 01-17-2014
Want to get list of Linux commands used on specific date through HISTORY command

I want to get list of linux commands used on Jan 01 2014 with the help of HISTORY command or some other linux commands,.

Kindly help.
# 2  
Old 01-17-2014
If you have not written anything special, then I doubt you can so easily...
# 3  
Old 01-17-2014
No. If I give history it displays all the linux commands entered from day 1

But specifically I want to list linux commands entered on a particular day.

Is this possible?

Thanks in advance

Last edited by Scott; 01-17-2014 at 10:25 AM.. Reason: Removed your update, since it relates to my post, which I have deleted
# 4  
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

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
Login or Register to Ask a Question