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
    Join Date
    2016-Jan
    Posts
    99
    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
    Join Date
    2015-Mar
    Posts
    141
    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. 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
  2. Replies: 1
    Last Post: 2014-03-26, 23:34
  3. 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
  4. GUI all lines
    By SmallOak in forum TroubleShooting Archive
    Replies: 0
    Last Post: 2013-11-24, 15:58

Posting Permissions

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