I'm working on an open source project to tracking the research activities. In one of the modules, I want to track the command history of a folder into the file(.history
) which is the same folder.
Example:
Let's say, I'm working on a folder /Users/ravi/test-project/
.
I'm using few of commands to start my work in that folder. Let's say I executed the following commands in the folder.
$wget https://mywebsite.com/script.py
$chmod +xw script.py
$echo "append some text " > script.py
$python script.py
I want all these commands to be saved into .history file of the folder ie., /Users/ravi/test-project/.history
.
Help much appreciated. Thanks in advance.