[Ilugc] History Command

Girish Venkatachalam girish1729 at yahoo.com
Thu Aug 17 01:45:43 IST 2006



--- kannan manoharan <scuffy_tomy at yahoo.co.in> wrote:

> 
> Hi
> 
> Thanks for the reply...
> 
> I have tried using history -r and i have got some
> lost commands 
> in .bash_history but i did not get all the commands
> which i have 
> used...
> is there any other possibility to recover all the
> commands which
> i have used...
AFAIK no. Bash history is somewhat idiosynchratic.

It doesn't store all commands typed in all ptys...

I think you can configure bash to behave itself though
I don't have the web link handy. 

A little bit of googling can help you avoid this
catastrophe in future but for now I am nearly certain
you can't recover your past commands.

If you think you cannot remember certain commands you
can use this construct.

$cd /usr/share/doc/
Type Control-A
Type "echo"
Redirect it to a file name

For instance, you can store the command in a file
bye

$echo "cd /usr/share/doc" > cd-cmd

Another feature I find useful in bash is the reverse
search a la emacs. Type Control-R. 

In any case it is worth knowing how to expand the
history buffer. 

regards,
Girish

> 
> Regards
> 
> Kannan M
> 
> 
> On 8/16/06, kannan manoharan
> <scuffy_tomy at yahoo.co.in> wrote:
> > Hi all,
> >
> >  I am using SuSE 9.3, i have cleaned all commands
> using "history -c".
> >
> >  Can any one tell me is there any possibility to
> recover all the 
> commands back by using "history" again.
> can be restored using history -r if the entries are
> there in
> .bash_history(by default it is stored there )
> 
> >  Regards
> >
> >  Kannan M
> >
> >
> > ---------------------------------
> >  Here's a new way to find what you're looking for
> - Yahoo! Answers
> > Send FREE SMS to your friend's mobile from Yahoo!
> Messenger Version 
> 8. Get it NOW
> > _______________________________________________
> > To unsubscribe, email ilugc-request at ae.iitm.ac.in
> with
> > "unsubscribe <password> <address>"
> > in the subject or body of the message.
> > http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
> >
> 
> 
> -- 
> Adarsh
> "Unless you change direction, You are likely to
> arrive at where you are 
> headed."
> _______________________________________________
> To unsubscribe, email ilugc-request at ae.iitm.ac.in
> with 
> "unsubscribe <password> <address>"
> in the subject or body of the message.  
> http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
>  
>  				
> ---------------------------------
>  Here's a new way to find what you're looking for -
> Yahoo! Answers 
> Send FREE SMS to your friend's mobile from Yahoo!
> Messenger Version 8. Get it NOW
> _______________________________________________
> To unsubscribe, email ilugc-request at ae.iitm.ac.in
> with 
> "unsubscribe <password> <address>"
> in the subject or body of the message.  
> http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the ilugc mailing list