Site Tools


ash_history

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ash_history [2024/10/31 21:51] hogwildash_history [2024/10/31 21:52] (current) hogwild
Line 7: Line 7:
 FreshTomato can execute a script at boot and at shutdown to backup and restore the command history to make it persistent across reboots. To achieve this, we need 2 scripts. One script will execute at shutdown to backup the history to permanent storage. The other will restore the history on boot. FreshTomato can execute a script at boot and at shutdown to backup and restore the command history to make it persistent across reboots. To achieve this, we need 2 scripts. One script will execute at shutdown to backup the history to permanent storage. The other will restore the history on boot.
  
- \\ \\ This shutdown script will save the last 100 commands used. To save more, change '100' to whatever number you wish. Name your backup script "cli_history_save.autostop" and use the following code:+ \\ \\ This shutdown script will save the last 100 commands used. \\ To save more, change '100' to whatever number you wish. \\ Name your backup script "cli_history_save.autostop" and use \\ the following code:
  
 <code bash cli_history_save.autostop> <code bash cli_history_save.autostop>
Line 23: Line 23:
 </code> </code>
  
- \\ \\ You must place the scripts in the mounted storage directory,  \\ (such as "/jffs" for JFFS or "/tmp/mnt/sda1" for USB). \\ Replace "sda1" with your actual partition name. Then, make the scripts executable with chmod:+ \\ \\ You must place the scripts in the mounted storage directory,  \\ (such as "/jffs" for JFFS or "/tmp/mnt/sda1" for USB). \\ Replace "sda1" with your actual partition name. Then, make the scripts \\ executable with chmod:
  
 <code bash> <code bash>
Line 29: Line 29:
 </code> </code>
  
- \\ + \\ \\  \\
- +
- \\+
  
  
ash_history.1730411470.txt.gz · Last modified: 2024/10/31 21:51 by hogwild