Minggu, 04 Februari 2018

How To Delete Bash Ascendancy History Inwards Linux

Bash History:- Bash history keeps the history of commands executed past times user inwards the final session. This allow us to re-use previous commands using up arrow key or nosotros tin run history command to cheque whole listing of commands.

Generally, it's non required to delete whatever dominance from the history simply approximately fourth dimension nosotros bespeak to delete few commands.
Example-  By mistake, In a dominance i cause got entered password inwards plainly text format in addition to I don't desire permit the history tape this password. In this instance i volition delete that dominance from the history.

Let's cause got a await at dominance below.

During MySQL connecter command, i mentioned password inwards command. equally inwards pic below.
root@PVM-Linux-UDev: # history 

Now, I desire to delete this dominance from the history list.

Let's role below dominance to delete the specific dominance from the history.

To delete unmarried dominance role next command.

root@PVM-Linux-UDev: # history -d 2008


In the higher upward dominance role dominance ID amongst history -d dominance .
Let's confirm deleted entry using history command.
root@PVM-Linux-UDev: # history 

To clear entire dominance listing role next command.

root@PVM-Linux-UDev: # history -c



Using history -c command,  yous tin clear entire bash history. See inwards higher upward illustration cypher is there.
Alternatively yous tin run below dominance to clear entire bash history.
root@PVM-Linux-UDev: # cat /dev/null >  /.bash_history 

Please note:- Generally, Normal user tin stance his ain bash history in addition to tin perform whatever activity over them. But root user in addition to stance anyone's bash history.



Sumber https://linuxhowtoguide.blogspot.com/

Tidak ada komentar:

Posting Komentar