Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 02-01-2011, 07:35 AM   #1
Registered: Aug 2009
Posts: 537

Rep: Reputation: 33
How to list command history from yesterday?

I know to list the command history with time stamp as follow:
history | more
But this just list the commands from today. But I want thoese from yesterday.

Old 02-01-2011, 07:57 AM   #2
Senior Member
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
How about increasing the values of HISTSIZE and HISTFILESIZE?
Old 02-01-2011, 08:07 AM   #3
LQ Guru
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296

By default history doesn't append date/time information to its lists. If you set the variable 'HISTTIMEFORMAT="%F %T"' then that'll be only until you logout/login or reboot if I'm not mistaking. One option could be to include 'export HISTTIMEFORMAT="%F %T"' in your .bash_profile so that it gets set every time you login. If you want to apply it globally for all users, then put it in /etc/profile.

Kind regards,



Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Is there any command to delete bash command history? cola Linux - Newbie 4 06-01-2010 08:32 AM
URGENT! Is there any command to get a history command lines and time in SUSE Linux.? igsoper Linux - Software 5 06-25-2009 03:14 AM
Totem history list phil1361 Linux - Software 3 02-01-2006 04:44 AM
Search Box History List akosombo Fedora 0 05-06-2005 08:36 PM
Some of my afferos don't show on the history list ppuru LQ Suggestions & Feedback 10 08-17-2004 11:57 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:16 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration