LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-07-2010, 05:18 PM   #1
frozenQueue
LQ Newbie
 
Registered: Jul 2010
Posts: 25

Rep: Reputation: 0
Save your own bash history permanently?


Lets say I wanted to save my bash history permanently. I.e., so I could look in a log somewhere and find some command I used 6 months ago, like the one I used to get my printer drivers installed.

This only would be the history for my own user (not all users).
 
Old 10-07-2010, 06:07 PM   #2
wje_lq
Member
 
Registered: Sep 2007
Location: Mariposa
Distribution: FreeBSD,Debian wheezy
Posts: 811

Rep: Reputation: 179Reputation: 179
Try putting something like this in your ~/.bashrc file:
Code:
date >> ~/bash_historie
cat ~/.bash_history >> ~/bash_historie
You'll probably get commands which appear in that file plenty of times, but this quick and dirty quick-n-dirtiness will do the job.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to save changes with iwconfig permanently?? marco18 Linux - Networking 4 02-21-2010 12:58 PM
tcsh: can you save the history from multiple shells to one history file? BrianK General 2 04-23-2009 05:19 AM
how to save bash history between reboots? Kropotkin *BSD 1 01-16-2007 03:28 PM
how to save iptables firewall rules permanently sunlinux Linux - Security 3 12-07-2006 11:53 AM
save history from konqueror steelheat Linux - Desktop 1 09-10-2006 09:11 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration