10 Nov 2009 @ 9:33 AM 

You know how you’ve been getting a new system up and running, and then you break something and just can’t remember how you got it working the first time?

Well, Linux has a solution for that. Commands you use on the bash shell is stored in history.

To view your history, just type

history

If you want to search for something specific you did, you can use grep. Eg:

history | grep -i some_command

To save your history to a file use :

history -w ~/history.txt

then feel free to open with your favourite text editor.

Bash keeps it’s own history in a file. You can view that file by opening ~./bash_history

Now to change your bash history length, just open up your .bashrc by doing so:

gedit ~/.bashrc

Once open, at the top add

export HISTFILESIZE=3000

Posted By: Zayin
Last Edit: 15 Nov 2009 @ 11:43 AM

EmailPermalink
Tags
Tags: ,
Categories: shell


 

Responses to this post » (None)

 
Post a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.


 Last 50 Posts
 Back
Change Theme...
  • Users » 1
  • Posts/Pages » 38
  • Comments » 61
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

Links



    No Child Pages.

Portfolio



    No Child Pages.