Delete terminal history in Linux

ชุมชนผู้ใช้ลีนุกซ์อื่นๆ
ตอบกลับ
รูปประจำตัวสมาชิก
slwt2002
Administrator
โพสต์: 126
ลงทะเบียนเมื่อ: พุธ 24 มิ.ย. 2015 18:03

Delete terminal history in Linux

โพสต์ โดย slwt2002 »

You can clear your bash history like this:

โค้ด: เลือกทั้งหมด

cat /dev/null > ~/.bash_history && history -c && exit

โค้ด: เลือกทั้งหมด

cat /dev/null > ~/.bash_history
erases the content of the

โค้ด: เลือกทั้งหมด

~/.bash_history
file.

โค้ด: เลือกทั้งหมด

history -c
clears the current terminal history.
ไม่มีลายเซ็นต์ ขอเขียนแล้วกัน
ตอบกลับ