Command history seems to be missing the first 75 lines

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












A couple of years ago, I did the automatic distribution update from 14.04 to 16.04. For the first time in my life, I was able to continue to use the computer after the automatic distribution update. As usual, the software repositories are all muntered, so system updates don't work properly, but I've gotten by.



I am going to do a clean installation of 18.04, however. In order to be able to configure my system more easily after the installation, I exported my command history to a text file.



$ history > /.../20180915_Command_history.txt


Beautifully, the resulting text file contains line numbers. Somewhat mysteriously, the first line number is 76. After looking at the first few lines, it looks like there were probably some previous commands.



  1. Do the line numbers just start at 76 for some reason?

  2. If not, is there any way that I can see lines 1 to 75?









share|improve this question























  • Mine starts from 994 and ends with 1993.
    – mikewhatever
    1 hour ago














up vote
1
down vote

favorite












A couple of years ago, I did the automatic distribution update from 14.04 to 16.04. For the first time in my life, I was able to continue to use the computer after the automatic distribution update. As usual, the software repositories are all muntered, so system updates don't work properly, but I've gotten by.



I am going to do a clean installation of 18.04, however. In order to be able to configure my system more easily after the installation, I exported my command history to a text file.



$ history > /.../20180915_Command_history.txt


Beautifully, the resulting text file contains line numbers. Somewhat mysteriously, the first line number is 76. After looking at the first few lines, it looks like there were probably some previous commands.



  1. Do the line numbers just start at 76 for some reason?

  2. If not, is there any way that I can see lines 1 to 75?









share|improve this question























  • Mine starts from 994 and ends with 1993.
    – mikewhatever
    1 hour ago












up vote
1
down vote

favorite









up vote
1
down vote

favorite











A couple of years ago, I did the automatic distribution update from 14.04 to 16.04. For the first time in my life, I was able to continue to use the computer after the automatic distribution update. As usual, the software repositories are all muntered, so system updates don't work properly, but I've gotten by.



I am going to do a clean installation of 18.04, however. In order to be able to configure my system more easily after the installation, I exported my command history to a text file.



$ history > /.../20180915_Command_history.txt


Beautifully, the resulting text file contains line numbers. Somewhat mysteriously, the first line number is 76. After looking at the first few lines, it looks like there were probably some previous commands.



  1. Do the line numbers just start at 76 for some reason?

  2. If not, is there any way that I can see lines 1 to 75?









share|improve this question















A couple of years ago, I did the automatic distribution update from 14.04 to 16.04. For the first time in my life, I was able to continue to use the computer after the automatic distribution update. As usual, the software repositories are all muntered, so system updates don't work properly, but I've gotten by.



I am going to do a clean installation of 18.04, however. In order to be able to configure my system more easily after the installation, I exported my command history to a text file.



$ history > /.../20180915_Command_history.txt


Beautifully, the resulting text file contains line numbers. Somewhat mysteriously, the first line number is 76. After looking at the first few lines, it looks like there were probably some previous commands.



  1. Do the line numbers just start at 76 for some reason?

  2. If not, is there any way that I can see lines 1 to 75?






command-line system-installation history






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 2 hours ago









Ravexina

27.9k146595




27.9k146595










asked 2 hours ago









el_gallo_azul

1662418




1662418











  • Mine starts from 994 and ends with 1993.
    – mikewhatever
    1 hour ago
















  • Mine starts from 994 and ends with 1993.
    – mikewhatever
    1 hour ago















Mine starts from 994 and ends with 1993.
– mikewhatever
1 hour ago




Mine starts from 994 and ends with 1993.
– mikewhatever
1 hour ago










1 Answer
1






active

oldest

votes

















up vote
2
down vote













First of all, If you need to get a backup of your command line history then just copy this file:



~/.bash_history


This is the answer to your second question:




If not, is there any way that I can see lines 1 to 75?




Every command that is in your history is available at .bash_history, to see them open a terminal and run:



cat ~/.bash_history


To get an output similar to history command with numbering run:



cat -n ~/.bash_history




Do the line numbers just start at 76 for some reason?




Run this command:



grep "^HIST" .bashrc


You have to get an output similar to:



HISTSIZE=1000
HISTFILESIZE=2000


As I said before ~/.bash_history keeps command-line's history.



The HISTFILESIZE show how many command that file keeps track of, for mine it's 2000, and HISTSIZE is the number of commands that history command keeps track of.



When you open a terminal history command will pick the last HISTSIZE number of commands from ~/.bash_history and shows that to you.



I guess you have 74 command more than of HISTSIZE in your .bash_history that's the reason why it starts at 75.






share|improve this answer






















  • I'll suggest my per-process bash history, see my answer at askubuntu.com/a/80882/25618
    – waltinator
    46 mins ago










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1075890%2fcommand-history-seems-to-be-missing-the-first-75-lines%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
2
down vote













First of all, If you need to get a backup of your command line history then just copy this file:



~/.bash_history


This is the answer to your second question:




If not, is there any way that I can see lines 1 to 75?




Every command that is in your history is available at .bash_history, to see them open a terminal and run:



cat ~/.bash_history


To get an output similar to history command with numbering run:



cat -n ~/.bash_history




Do the line numbers just start at 76 for some reason?




Run this command:



grep "^HIST" .bashrc


You have to get an output similar to:



HISTSIZE=1000
HISTFILESIZE=2000


As I said before ~/.bash_history keeps command-line's history.



The HISTFILESIZE show how many command that file keeps track of, for mine it's 2000, and HISTSIZE is the number of commands that history command keeps track of.



When you open a terminal history command will pick the last HISTSIZE number of commands from ~/.bash_history and shows that to you.



I guess you have 74 command more than of HISTSIZE in your .bash_history that's the reason why it starts at 75.






share|improve this answer






















  • I'll suggest my per-process bash history, see my answer at askubuntu.com/a/80882/25618
    – waltinator
    46 mins ago














up vote
2
down vote













First of all, If you need to get a backup of your command line history then just copy this file:



~/.bash_history


This is the answer to your second question:




If not, is there any way that I can see lines 1 to 75?




Every command that is in your history is available at .bash_history, to see them open a terminal and run:



cat ~/.bash_history


To get an output similar to history command with numbering run:



cat -n ~/.bash_history




Do the line numbers just start at 76 for some reason?




Run this command:



grep "^HIST" .bashrc


You have to get an output similar to:



HISTSIZE=1000
HISTFILESIZE=2000


As I said before ~/.bash_history keeps command-line's history.



The HISTFILESIZE show how many command that file keeps track of, for mine it's 2000, and HISTSIZE is the number of commands that history command keeps track of.



When you open a terminal history command will pick the last HISTSIZE number of commands from ~/.bash_history and shows that to you.



I guess you have 74 command more than of HISTSIZE in your .bash_history that's the reason why it starts at 75.






share|improve this answer






















  • I'll suggest my per-process bash history, see my answer at askubuntu.com/a/80882/25618
    – waltinator
    46 mins ago












up vote
2
down vote










up vote
2
down vote









First of all, If you need to get a backup of your command line history then just copy this file:



~/.bash_history


This is the answer to your second question:




If not, is there any way that I can see lines 1 to 75?




Every command that is in your history is available at .bash_history, to see them open a terminal and run:



cat ~/.bash_history


To get an output similar to history command with numbering run:



cat -n ~/.bash_history




Do the line numbers just start at 76 for some reason?




Run this command:



grep "^HIST" .bashrc


You have to get an output similar to:



HISTSIZE=1000
HISTFILESIZE=2000


As I said before ~/.bash_history keeps command-line's history.



The HISTFILESIZE show how many command that file keeps track of, for mine it's 2000, and HISTSIZE is the number of commands that history command keeps track of.



When you open a terminal history command will pick the last HISTSIZE number of commands from ~/.bash_history and shows that to you.



I guess you have 74 command more than of HISTSIZE in your .bash_history that's the reason why it starts at 75.






share|improve this answer














First of all, If you need to get a backup of your command line history then just copy this file:



~/.bash_history


This is the answer to your second question:




If not, is there any way that I can see lines 1 to 75?




Every command that is in your history is available at .bash_history, to see them open a terminal and run:



cat ~/.bash_history


To get an output similar to history command with numbering run:



cat -n ~/.bash_history




Do the line numbers just start at 76 for some reason?




Run this command:



grep "^HIST" .bashrc


You have to get an output similar to:



HISTSIZE=1000
HISTFILESIZE=2000


As I said before ~/.bash_history keeps command-line's history.



The HISTFILESIZE show how many command that file keeps track of, for mine it's 2000, and HISTSIZE is the number of commands that history command keeps track of.



When you open a terminal history command will pick the last HISTSIZE number of commands from ~/.bash_history and shows that to you.



I guess you have 74 command more than of HISTSIZE in your .bash_history that's the reason why it starts at 75.







share|improve this answer














share|improve this answer



share|improve this answer








edited 2 hours ago

























answered 2 hours ago









Ravexina

27.9k146595




27.9k146595











  • I'll suggest my per-process bash history, see my answer at askubuntu.com/a/80882/25618
    – waltinator
    46 mins ago
















  • I'll suggest my per-process bash history, see my answer at askubuntu.com/a/80882/25618
    – waltinator
    46 mins ago















I'll suggest my per-process bash history, see my answer at askubuntu.com/a/80882/25618
– waltinator
46 mins ago




I'll suggest my per-process bash history, see my answer at askubuntu.com/a/80882/25618
– waltinator
46 mins ago

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1075890%2fcommand-history-seems-to-be-missing-the-first-75-lines%23new-answer', 'question_page');

);

Post as a guest













































































Comments

Popular posts from this blog

What does second last employer means? [closed]

Installing NextGIS Connect into QGIS 3?

One-line joke