Big Sur清除終端機歷史指令 - MAC

Table of Contents


想問一下如何清除終端機的歷史指令
OS 是big sur

上網查了一下

history -c 沒用

histfile 也沒反應

網路上的方法好像都是舊版本在用的

請板上先進解惑 感謝


--

All Comments

Eden avatarEden2020-12-07
為什麼需要清除啊,繼續用就好啊@@
Zenobia avatarZenobia2020-12-10
別忘了macOS Catalina已經從bash改成zsh,或許從zsh搜尋
比較容易找到答案
Hazel avatarHazel2020-12-13
砍掉 ~/.xx_history 這檔案
Elizabeth avatarElizabeth2020-12-17
刪掉 bash history 檔 你是 zsh 則找 zsh history
Skylar DavisLinda avatarSkylar DavisLinda2020-12-20
以前室友iMac 被駭,history 也被清空,只是是對方清的
Ursula avatarUrsula2020-12-23
試試在你 ~/.zshrc 檔中加入 SAVEHIST=0
Tristan Cohan avatarTristan Cohan2020-12-25
被對方清lol
Agnes avatarAgnes2020-12-29
history -c
Yedda avatarYedda2020-12-29
我剛試是 OK
Puput avatarPuput2021-01-03
同樓上 history -c 可以用
Megan avatarMegan2021-01-06
以後使用指令前面都加空格