Results 1 to 5 of 5

Thread: fixed command lines in bash_history file

  1. #1
    Join Date
    2013-Aug
    Location
    lost in space
    Posts
    580

    fixed command lines in bash_history file

    Hello,

    Is there a way to prevent my bash_history file from recording new command lines in it?

    In other words I want it to stay just the way it is, without the latest entry being writing in it. That puts me in a bad mood whenever I have to search for my command lines, buried under other syntax that I really don't need
    Kali Linux USB Installation using LinuxLive USB Creator
    Howto Install HDD Kali on a USB Key
    Clean your laptop fan | basic knowledge

  2. #2
    use to be.."set +o history" to turn it off and "set -o history" to turn it on. at least once worked. never tried lately tho. Happy bash'ing

  3. #3
    Join Date
    2013-Aug
    Location
    lost in space
    Posts
    580
    Thanks bob will try that next time I use KL.

    Wish there was a way to have two bash_history files. One that doesn't change and a normal one that record everything. The first one would need [Shift]+[arrow keys] and the normal one just using arrow keys (like it is now). Meh me and my crazy revolutionary ideas...
    Kali Linux USB Installation using LinuxLive USB Creator
    Howto Install HDD Kali on a USB Key
    Clean your laptop fan | basic knowledge

  4. #4
    What i would probably try is, make a copy of the one you want not changed, and make it read-only.

    then make a small script to basically "switch" it with a r/w history file that changes as you use it.
    If you understand what i am saying...

  5. #5
    Join Date
    2013-Aug
    Location
    lost in space
    Posts
    580
    niope, that's your job to make us good software


    Edit: Ok bob79, it works, but it's not permanent and the command must be used at the beginning of a session of each console. Still very useful to know
    Last edited by Quest; 2016-03-14 at 12:55.
    Kali Linux USB Installation using LinuxLive USB Creator
    Howto Install HDD Kali on a USB Key
    Clean your laptop fan | basic knowledge

Similar Threads

  1. cd command help / no such file or directory
    By anon_j1 in forum General Archive
    Replies: 2
    Last Post: 2022-07-24, 08:58
  2. why .bash_history file is not owned by any package
    By Hemant in forum General Archive
    Replies: 1
    Last Post: 2020-02-21, 16:44
  3. Replies: 2
    Last Post: 2018-05-08, 18:50
  4. How to Speed up Pyrit "lines per second" (lines/s)?
    By colegagliano in forum General Archive
    Replies: 1
    Last Post: 2014-04-15, 07:01
  5. Fixed winexe and nvidia-cuda-toolkit 5.05> bin2c file conflict
    By jubei in forum TroubleShooting Archive
    Replies: 1
    Last Post: 2013-11-28, 15:26

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •