This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Log for history session and user specific ...

 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

how can I create a script on linux that records every command entered and appends every change made and closes the file after the session terminates or the user quits.. I thought about changing the .bashrc file but how can it be done >?? thank you
 
Satish Chilukuri
Ranch Hand
Posts: 266
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Vassili Vladimir:
Hi,

how can I create a script on linux that records every command entered and appends every change made and closes the file after the session terminates or the user quits.. I thought about changing the .bashrc file but how can it be done >?? thank you


bash already has a feature for logging commands. They are stored in .bash_history in the user's home directory.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic