Python Forum
how to put history=0 in command prompt
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to put history=0 in command prompt
#1
Hi all! I have about 100 commands possible in command prompt. Most of them are repeated. "history" alone shows these possible commands. But impossible to delete them. Here my error messages;
Error:
C:\Users\Sylvain λ reset history 1 [main] reset 8760 cygwin_exception::open_stackdumpfile: Dumping stack trace to reset.exe.stackdump C:\Users\Sylvain λ set history Environment variable history not defined C:\Users\Sylvain λ history=0 'history' is not recognized as an internal or external command, operable program or batch file. C:\Users\Sylvain λ set history Environment variable history not defined C:\Users\Sylvain λ history=0 'history' is not recognized as an internal or external command, operable program or batch file.
Reply
#2
Sylas, please post in the correct subforum! This has nothing to do with python to be in the General Coding Help subforum... or even better - ask in the correct forum: https://www.google.com/search?q=windows+help+forum
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
@buran
Do you think I will ever have a reply in this Bar forum ? I don't think so. Who looks at this Bar forum ?
Reply
#4
This is python related forum and this is off-topic question. I would expect that if someone know the answer, they will help. If you are not satisfied, you can ask on windows-related forum.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#5
Try history -c.
Cygwin right? The bash command to clear the history is history -c
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#6
@wavic
Thanks for your reply. I tried it on my "C:\Users\Sylvain". It does not work. I think there is a question of "Administrator". But I don't know how to become Administrator once I am on my Command Prompt.
Reply
#7
I don't think you can elevate priviliges once cmd is open. You can either right-click cmd.exe and select Run as administrator OR press windows key+R, then enter cmd in the run window that will open and press cntrl+shift+enter
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#8
Thanks to Buran. I tried your 2d proposal. It works fine. At the top of my command prompt ihave: C:\WINDOWS\system32\cmd.exe

And inside I have:

Microsoft Windows [Version 10.0.17134.48]
© 2018 Microsoft Corporation. All rights reserved.

C:\Users\Sylvain>set history
Environment variable history not defined

C:\Users\Sylvain>history=10
'history' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Sylvain>set history=10

C:\Users\Sylvain>history
'history' is not recognized as an internal or external command,
operable program or batch file.
Reply
#9
Hm! I don't remember if the cygwin has .bashrc file. Try to find it. See this: https://www.cygwin.com/cygwin-ug-net/setup-files.html
Put at the end of file on a new line this: HISTSIZE=0
Save the file and run cygwin again.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#10
@wavic
With a double right click on lambda(on the pinned icons at the bottom of the screen)my lambda is transformed; Now I am sure I am Administrator. The new command prompt accepts "set history=10", but does not accept "HISTSIZE=10". I am not strong in python, so I don't understand your "cygwin". I went to your link.
Error:
C:\Users\Sylvain λ HISTSIZE=10 'HISTSIZE' is not recognized as an internal or external command, operable program or batch file.

How is it possible you two big members of the staff, cannot solve this problem: put history = 10 ? With linux, no problem. Please go to this lambda icone, right click twice, become administrator and tell me if you can limit the possible commands, to ten. Thanks
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  New for history Buffs Larz60+ 0 2,044 Oct-17-2018, 07:35 PM
Last Post: Larz60+
  How to become Administrator, once in Command Prompt sylas 4 7,185 Apr-03-2018, 04:42 PM
Last Post: sylas
  Using command prompt on windows 10 sylas 4 3,400 Feb-28-2018, 08:59 AM
Last Post: Loughran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020