Get the App
SLTechnology News&Howtos  ›  Servers  › 

How does linux clear historical commands?

Shulou Source: shulou.com Published: 2022-06-03 06:10:07 10月04日 Update

Below by the Linux tutorial column to introduce you under the linux environment, clear the history recorded in the history of the command method, I hope to help friends in need!

1. History

This command allows you to view historical commands that have been used

II. History-c

This command and argument can clear the history historical command record

Check again

The command record is already empty

Remarks: knowledge expansion

This command only deletes the command record of the current user, not that of other users.

In fact, these records are in the current user's home directory. Bash_history similar files, of course, depends on what shell you use.

For example: vim ~ /. Bash_history opens the history command record file under the current user.

Cat or vim ~ / .bash_history to view the contents of the file

These are the details of the historical commands recorded in history under linux. Please pay attention to other related articles for more.

Tags: Commands history files users content again parameters remarks that is heads of households tutorials articles methods more friends columns environment directories knowledge help Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Shulou Tech Info MySQL Docker vpn