Cette page n'est pas encore disponible dans votre langue. Nous nous efforçons d'ajouter d'autres langues. Nous vous remercions de votre compréhension.

On this page

Modifying Historical Record Configuration Items

Updated on 2022-09-09 GMT+08:00

Scenario

Modify the /etc/profile.d/history.sh configuration file to sort historical records by date and time. A maximum of 1000 historical records can be stored.

NOTE:

This method applies to all OSs except EulerOS.

Procedure

  1. Open the /etc/profile.d/history.sh file.

    vi /etc/profile.d/history.sh

  2. Press i to enter editing mode and add the following content at the end of the file:
    export HISTTIMEFORMAT="%F %T `whoami` "
    export HISTSIZE=1000
  3. Press Esc and enter :wq to save and exit the file.
Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback