How to get the "history" command to show all that is in the .bash_history file?


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers How to get the "history" command to show all that is in the .bash_history file?
# 1  
Old 09-28-2016
How to get the "history" command to show all that is in the .bash_history file?

I am using the bash shell.

When I view my recent command history using the "history" command from the prompt, it only shows me the commands starting at #928.

The commands I need are earlier than that, but I can't figure out how to make the other 927 display.

They are in my .bash_history file, but I need the commands with the time stamps (which I add with the export HISTTIMEFORMAT='%F %T ' command) and would like to repeat a series of commands using their numbers.

Any help is appreciated!
# 2  
Old 09-28-2016
If you want to go above the default 500 initial values for HISTFILESIZE and HISTSIZE, you'll probably need to set them in your shell startup files, logout of all of your current terminal sessions, and login again to make them take effect. Trying to recover more than HISTFILESIZE entries from your past history is not likely to work until you build up the history after resetting those values.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

2. Red Hat

"/usr/sbin/hpacucli ctrl all show" command does not work

Dear Concern, We have observed that following command stuck/does not work in some RedHat nodes. Please advise us to troubleshoot the issue. /usr/sbin/hpacucli ctrl all show Note: HP Array Configuration Utility CLI for Linux 64-bit With Best Regards, Md. Abdullah-Al Kauser (3 Replies)
Discussion started by: makauser
3 Replies

3. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

4. UNIX for Dummies Questions & Answers

[Solved] How to clear "history" command entries??

As in the title, how to clear the history entries? For eg: if i enter history, series of linux commands getting displayed from day 1. I need to clear those entries and want linux commands to be stored freshly. Thanks in advance (6 Replies)
Discussion started by: karthick nath
6 Replies

5. UNIX for Dummies Questions & Answers

Unix "look" Command "File too large" Error Message

I am trying to find lines in a text file larger than 3 Gb that start with a given string. My command looks like this: $ look "string" "/home/patrick/filename.txt" However, this gives me the following message: "look: /home/patrick/filename.txt: File too large" So, I have two... (14 Replies)
Discussion started by: shishong
14 Replies

6. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

7. Shell Programming and Scripting

What is the ksh equivalent to bash's "history -c" command?

Hi, What is the korn shell equivalent of bash shell's "history -c" command? I do know, how to clear the history list in ksh, I can do the following: > ~/.sh_historybut still, I am interested to know the single one line command as 'history -c' gives error on my ksh (1 Reply)
Discussion started by: royalibrahim
1 Replies

8. Shell Programming and Scripting

Command Character size limit in the "sh" and "bourne" shell

Hi!!.. I would like to know what is maximum character size for a command in the "sh" or "bourne" shell? Thanks in advance.. Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies

9. HP-UX

Problems with "show device" command

I have a DS25 and when i run "show device" don't appear my 'dka.....' and 'dkb....' devices, but i know they must be there, where could be the error? what can i do to see them? (3 Replies)
Discussion started by: Lestat
3 Replies

10. UNIX for Advanced & Expert Users

Problems with "show device" command

I have a DS25 and when i run "show device" don't appear my 'dka.....' and 'dkb....' devices, but i know they must be there, where could be the error? what can i do to see them? I'm using Tru64 PD: Im so sorry if i repeat this Q but i really need an answer and i dunno where to ask... (6 Replies)
Discussion started by: Lestat
6 Replies
Login or Register to Ask a Question