954,153 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Extract HISTORY from putty to windows .txt

Hi all hope you are well.
I am interested in a quick method (besides cut 'n' paste) of extracting my command history from a putty session (Linux version Red Hat Enterprise Linux ES release 3 (Taroon Update 9)) to a windows text file. Any ideas on that? Thanks for your time.

majestic0110
Nearly a Posting Virtuoso
1,328 posts since Oct 2007
Reputation Points: 256
Solved Threads: 72
 

Well, wherever your history log is stored, just use echo "whateverthehistoryis" > "XXX.txt"

Or find the history log and copy and paste the file into a new directory.

linux
Posting Shark
933 posts since Aug 2006
Reputation Points: 118
Solved Threads: 30
 

That simple ? lol Thanks a lot for your response, very helpful!

majestic0110
Nearly a Posting Virtuoso
1,328 posts since Oct 2007
Reputation Points: 256
Solved Threads: 72
 

Even better try this:

echo |history > history.txt
majestic0110
Nearly a Posting Virtuoso
1,328 posts since Oct 2007
Reputation Points: 256
Solved Threads: 72
 

Yeah, I was stating that echo something > file.txt would do that.

linux
Posting Shark
933 posts since Aug 2006
Reputation Points: 118
Solved Threads: 30
 

oh I didnt realise you meant with the pipe!lol

majestic0110
Nearly a Posting Virtuoso
1,328 posts since Oct 2007
Reputation Points: 256
Solved Threads: 72
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: