I try to use history
command in a bash script but it didn't work.
The code of the bash file:
#!/bin/bash
# Copy history to file history
#cd /media/saleel_almajd/Study/linux/my_scripts/
echo "start Copy history to /media/saleel_almajd/Study/linux/my_scripts/history.txt"
export HISTTIMEFORMAT='%F %T ' #to make history and date apear
history >> /media/saleel_almajd/Study/linux/my_scripts/history.txt
#cd
echo "... copy done ..."
#history -c
echo "..... history cleared ..... "
echo "___ Done Successfully ___"