[colug-432] Another bash question, su + history ?

Tom Hanlon tom at functionalmedia.com
Wed Dec 28 19:49:49 EST 2011


Colug, 

I find myself in training classes as the instructor where a student or myself has performed a number of steps while logged in as the incorrect user. 

So I point this out, and they su as needed. 

But the history is left as entered in the wrong user history file. 

Does anyone here have any quick tricks to su but also grab the last 10 lines or so of history ? 

I am thinking I could write up a shell script, but thoughts on shortcuts. 

history 10 >> new user history file or something ? 

--
Tom 



Tom Hanlon
tom at functionalmedia.com
Cloudera Certified Hadoop Developer
Certified MySQL DBA




More information about the colug-432 mailing list