0

I feel like someone would have asked this question before, however, I cannot find anything and it may be because it's too obvious and I'm looking in the wrong file or I'm not searching a good key term to find out.

I want to view some of my old output in the terminal (OSX) and I assumed that was stored in my .zsh_history and all I'm seeing is all my input without the outputs.

Is there a way I can go back and view this?

Is there a way I can save it for future use if not?

garrettmac
  • 8,417
  • 3
  • 41
  • 60

1 Answers1

0

This is not zsh specific, It applies to most of the shells

If you executed the commands with output redirection, like

someCommand > someFile.txt  

or appended command output like this,

someCommand >> someFile.txt

They will be stored to the specific file. Else you would have to run each command again

This may solve your issue

Community
  • 1
  • 1
salmanulfarzy
  • 1,484
  • 14
  • 18
  • It is better to provide the text of the solution here and reference the link. Link only answers are not considered good Stackoverflow practice. – Cliff Ribaudo Oct 25 '15 at 11:24
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – Cliff Ribaudo Oct 25 '15 at 11:24
  • @Cliff Thanks for pointing out. Added some essential parts of the answer from the link. – salmanulfarzy Oct 25 '15 at 14:45