SliTaz SliTaz Forum

You are not logged in.

#1 2016-10-11 11:21:58

VenomSnake
Member
Registered: 2016-07-31
Posts: 8

Clear History

Hello Community,

how can I clear the History from Terminal ?

Offline

#2 2016-10-11 14:34:08

bellard
Administrator
Registered: 2011-03-28
Posts: 657

Re: Clear History

rm ~/.ash_history

Offline

#3 2016-10-24 01:50:05

hackdorte
Member
Registered: 2014-06-05
Posts: 83

Re: Clear History

You can create a script:

[c]#!/bin/sh

rm ~/.ash_history
touch ~/.ash_history

exit[/c]
Save as: clear-history

Give permission: chmod +x clear-history

And put it in:  ~/.local/bin

To run the script: clear-history

...

Offline

#4 2016-10-24 04:59:22

sixofeight
Member
Registered: 2013-07-02
Posts: 234

Re: Clear History

> ~/.ash_history

..should be sufficient..

Offline

#5 2018-10-22 22:39:54

R8
Member
Registered: 2015-08-20
Posts: 143

Re: Clear History

Hello,

If I delete the file .ash_history (in /home/username/), the history as 'user' is cleared, that's OK.

But when I go root (su in terminal), I continue to see another history (history as root). Where/how can I delete history as root?

Thank you

Offline

#6 2018-10-23 08:56:52

gibor
Moderator
Registered: 2011-04-30
Posts: 1,067

Re: Clear History

As root repeat same command

> ~/.ash_history

or

> /root/.ash_history

Offline

#7 2018-10-24 18:43:09

R8
Member
Registered: 2015-08-20
Posts: 143

Re: Clear History

OK, thank you.

To resume, to clear the history as user + root, I deleted 2 files :

/home/username/.ash_history

/root/.ash_history

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.017 seconds, 7 queries executed - Memory usage: 1.53 MiB (Peak: 1.77 MiB) ]