Windows PowerShell (included in recent versions of windows) does save history of past commands (but can't be used for anaconda based on comment below).
Hi. Is there a command that allows you to know which are all the commands that a user has typed in Anaconda prompt in Windows 10 ?
For example, in Linux (Ubuntu) I was used to know this just by clicking the arrow pointing up on the keyboard once opened the terminal. In this way I have one by one all the commands used in the past.
In Windows 10 this does not work :( how can I do ?
I hope that this question is suitable for this website and that I have been clear. Thank you in advance.
Manuela.
1 answer
The word that describes the feature is "command history", the up-arrow key does work on Windows as well as long as the shell is open.
But, unlike Linux, it seems that Windows does not save the history once the terminal is closed (I am not on my Windows machine and I can't check) but this is what I found:
https://serverfault.com/questions/95404/is-there-a-global-persistent-cmd-history
Alas, the anaconda prompt relies on the traditional command-line prompt.
It is basically a command-line terminal shortcut that has all the paths set to properly work with Anaconda.
Thank you all... I searched better and it seems there is a command to know this that is grep -B1 "^# cmd" my_env/conda-meta/history (I found in StackOverflow) but I have problems in installing grep.
try:
conda install grep
or use the findstr command that is supposedly the windows equivalent for grep:
https://www.shellhacks.com/windows-grep-equivalent-cmd-powershell/
Log in to answer this question.
What is an
anacondaprompt? Just windows command line prompt?I meant this.
I haven't tested these and check if any of following commands work: