UberStudent Forums

Help and Community for Users of Uberstudent
Return to UberStudent Home Page
It is currently Wed Oct 18, 2017 2:02 am

All times are UTC




UberStudent Logo Shirt
Hey! You can wear this UberCool UberStudent Logo Shirt

Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Tue Sep 30, 2014 8:14 pm 
Offline
UberStudent Forum Helper

Joined: Fri Jul 25, 2014 11:17 pm
Posts: 65
Is it possible to export the list of used commands in Terminal and then import it to another computer?

I mean the list that flicks through when the up and down arrows are pressed while using Terminal.

I can usually remember that I have used "some" command to achieve something before, but not the exact syntax required to make the command work again.


Top
 Profile  
 
PostPosted: Wed Oct 01, 2014 3:08 pm 
Offline
UberStudent Staff
User avatar

Joined: Mon Jan 21, 2013 7:18 pm
Posts: 101
Secrect A Gent wrote:
Is it possible to export the list of used commands in Terminal and then import it to another computer?

In a user's home directory is a "hidden" file called .bash_history. (The first character of the filename being "." is what makes it hidden from default view.) If you were to copy that file to another user's home directory (which would overwrite their .bash_history), the second user would see the first user's command history as their own (provided that file ownership was properly reassigned via chown).

To view your .bash_history file:
Code:
yourusername@uberstudent:~$ less ~/.bash_history

To export your .bash_history to a USB drive:
Code:
yourusername@uberstudent:~$ cp ~/.bash_history /media/yourusername/yourusbdrive/bash_history.txt

To edit that bash_history.txt file:
Code:
yourusername@uberstudent:~$ nano /media/yourusername/yourusbdrive/bash_history.txt

To import that bash_history.txt file from your USB drive to a fresh install:
Code:
yourusername@uberstudent:~$ cp /media/yourusername/yourusbdrive/bash_history.txt ~/.bash_history

_________________
Cybermancy.net - Creativity via code


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

Click Here to Get Inexpensive UberStudent Discs


Click here to get UberStudent discs delivered to your mailbox
Delivered Directly to Your Mailbox!



All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group